Questions tagged [sigpipe]

SIGPIPE is the signal sent to a process when it attempts to write to a pipe without a process connected to the other end.

On POSIX-compliant platforms, SIGPIPE is the signal sent to a process when it attempts to write to a pipe without a process connected to the other end. The symbolic constant for SIGPIPE is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

95 questions
0
votes
0 answers

Prevent "broken pipe" for child process in bash

This has a broken pipe error which I want to suppress: #!/bin/bash touch /tmp/foo tail -f /tmp/foo & PID=$! echo before kill -9 $PID echo after while true; do echo x sleep 1 done output: before after x ./test.sh: line 17: 23327 Killed …
spraff
  • 32,570
  • 22
  • 121
  • 229
0
votes
0 answers

Named Pipes in C loss of information

I'm using named pipes in C to transfer struct from one program to the other. When I just execute the programs as they are, I realized that on the reading side I'm not reading everything that I'm supposed to read. It seems that either reading or…
gisil
  • 71
  • 1
  • 4
0
votes
1 answer

shell in c not working as expected - broken pipe related

Hi im building a little minishell for UNIX in my OS signature, when I compile the code and try it in my machine there are no errors but at the moment that the automatic corrector checks the code, it throws a BROKEN PIPE error. This is what i have…
0
votes
3 answers

Writing a webserver in objective c-- getting a SIGPIPE call when uploading larger files

I am writing a webserver for a music sharing app ... when I have a large file (i.e an mp3) this does not work. It crashes on SIGPIPE error code. The header I am sending has "Connection: close" -- but I assumed this would wait until after the…
user491880
  • 4,709
  • 4
  • 28
  • 49
0
votes
2 answers

Caught a fatal signal: SIGBUS(7) on node 2/32

I'm trying to run NAS-UPC benchmarks on a 32 node cluster. It works fine in cases where the problem size is small . When I graduate to a bigger problem size (CLASS D), I get this error (for MG benchmark) *** Caught a fatal signal: SIGBUS(7) on node…
Sharat Chandra
  • 4,434
  • 7
  • 49
  • 66
0
votes
0 answers

Ignore SIGPIPE in Notification Service Extension Objective C

I have an messenger app with a Notification Service Extension for handling notifications and runs an AFHTTPSessionManager service. When I receive the first notification I get a SIGPIPE error and the extension crashes and I lose all the notifications…
0
votes
2 answers

Broken Pipe for C-Socket. How to only keep server running?

In a simple program where I'm trying to send command-line inputs from client to server, I keep getting a "Broken Pipe" for the server side. I send a string to the server and the server returns the string as lower-case to the client.…
Joe
  • 23
  • 7
0
votes
1 answer

SIGPIPE in bidirectional messaging with two pipes

Hi I've to develop this program that create 4 children and, sequentially, make 'em do a simple operation. The first will do the sum, the second the rest, the third the multiplication and the fourth the division. The father will write on the socket…
0
votes
0 answers

C++: unable to connect to server socket (linux)

Dears, I have a main program that executes a child process and tries to connect to this child process via socket. This connection works properly. But, when an error is detected, the main program tries to properly close the socket connection, then it…
Brice
  • 1
  • 1
0
votes
1 answer

sigpipe with sscanf and threading

DESCRIPTION I made a C server mod for cube 2: Sauerbraten https://github.com/deathstar/QServCollect all the code can be found at the link above The IRC Bot eventually stops sending the ping/pong data on the opened socket. The process is threaded and…
0
votes
1 answer

Broken pipe error and connection reset by peer 104

I'm using Bottle server to implement my own server using an implementation not so far away from the simple "hello world" here , my own implementation is (without the routing section of course): bottleApp =bottle.app() …
JavaSa
  • 5,813
  • 16
  • 71
  • 121
0
votes
1 answer

Python - segmentation error in ubuntu 12.04

My program is coded in Python, and it calls a bash script in a vte window: In 14.04 or 14.10 ubuntu system, no problem. (python 2.7.8) But, in ubuntu 12.04, the window closes with this message: (python 2.7.3) segmentation error To debug, I've…
Guillaume
  • 2,752
  • 5
  • 27
  • 42
0
votes
1 answer

sigpipe c server/client - where does the program restart?

I've a client/server program, now I want to handle signals. When the client closes the connection (if for example I close the terminal), the server has to handle a SIGPIPE, am I right? I'd like to implement something like this. Is it…
testermaster
  • 1,031
  • 6
  • 21
  • 40
0
votes
1 answer

How does SIGPIPE affect writer in named pipe?

We need to redirect an application's stdout to our program. And we cannot change the application. So that, we cannot handle SIGPIPE in the writer. We do not want the application terminate when our program crashes. Unnamed pipe cannot work then. But…
user3772724
  • 125
  • 6
0
votes
0 answers

How to send signal to server when client has closed connection in C

I want to create single side chat application using c and when reader(client) presses Ctrl+c, writer(server) should be closed.But problem is still I cant figure out how to sent signal to writer when reader presses Ctrl+c. Please give any suggestion…
GPrathap
  • 7,336
  • 7
  • 65
  • 83