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
1
vote
0 answers

SIGPIPE signal handling

I'm trying to figure out how does a pipe communication between two related processes work, so I wrote this simple C program. #define READ 0 #define WRITE 1 char* phrase = "This is a message!!!"; char* phrase2 = "This is a second…
88mdil
  • 43
  • 1
  • 8
1
vote
2 answers

Is it possible to detect which pipe threw a SIGPIPE?

I'm trying to deal with a server that works as follows: It has a parent process It creates a "helper" child process to handles some special tasks It opens the child process with a pipe; and uses the pipe to issue commands to the child. It also…
DVK
  • 126,886
  • 32
  • 213
  • 327
1
vote
1 answer

EPIPE error does not appear?

Base on what I read about SIGPIPE, I made a test to try to produce the SIGPIPE issue. Here is the code for the server and the client: Server code: #include #include #include #include #include…
Hieu Nguyen
  • 382
  • 2
  • 15
1
vote
1 answer

What is the policy of terminating piped program in bash?

When is the piped program terminated and who controls this termination process? I've read Bash: why the pipe is terminated? but it covers this question only partially. After trying to answer this question myself I made a couple of examples to see…
sasha.sochka
  • 14,395
  • 10
  • 44
  • 68
1
vote
1 answer

SIGPIPE in a simple two process program

I have a simple setup for a fork and pipe that I have used before. But this time around I'm getting a SIGPIPE in my write call. Here's the code int fd[2]; int pid; if (pipe(fd) == -1) { perror("pipe init error"); exit(1); } //…
keyvanm
  • 157
  • 9
1
vote
0 answers

SIGPIPE Error when using write()

I am getting a SIGPIPE error when I try to write to a file descriptor that was returned when I opened a USB device. I can read all day from it, but I cannot write to it. Below is the code: #include #include #include…
Zonxwedop
  • 387
  • 1
  • 3
  • 12
1
vote
1 answer

Ignore SIGPIPE for a single popen'd FILE*

The code I am looking at is here: http://github.com/andymatuschak/Sparkle/blob/8ea15468b4a8c0487ca7a72f3c9e6ffb708c6af8/SUPipedUnarchiver.m Sparkle is like a plugin. It can be instantiated in a multi-threaded program. Thus I don't want to call…
mxcl
  • 26,392
  • 12
  • 99
  • 98
1
vote
0 answers

SIGPIPE (Broken pipe) on tcp_disconnect to exec a client (WCF Soap 1.1 and server)

I am developing a Qt client (C++) with gSOAP lib, which is supposed to discuss with a Web Service by Microsoft (WCF). I use SOAP 1.1 on both sides. My client code is as follows : CustomBinding_USCOREISynchronisation service; soap_ssl_init(); /*…
0
votes
1 answer

Error when Rmpi slaves call a user-defined function

I have written an Rmpi code in which I wish the master to share the burden of work equally with the slaves. So function work_by_master does mpi.bcast.cmd to work_by_slaves which both inturn call work_to_be_done_per_process before doing send-receive…
Aditi
  • 59
  • 4
0
votes
1 answer

SIGPIPE error in a TCP based Concurrent Echo Cleint-Sever

I am new to network programming, and have been learning this by writing small programs that make use of the Socket API. Currently, I am writing a simple echo server, that uses fork to create a copy of it, as soon as it gets a connect request, this…
hytriutucx
  • 1,614
  • 6
  • 26
  • 37
0
votes
3 answers

SIGPIPE not being generated immediately after 1st send

I want to know whether its possible for tcp socket to report any broken pipe error immediately. Currently i am catching the sigpipe signal at the client side when server goes down ... but i found that the sigpipe signal is generated only after 2nd…
0
votes
2 answers

Is SIGPIPE signal received when reader is killed forcefully(kill -9)?

I have created a fifo using C and python programs. The fifo is created in the C program, which does the reading Operation and the writing is done in Python. My question is as follows: If my reader(C program) is killed forcefully, my writer keeps…
pratibhamenon
  • 363
  • 2
  • 8
0
votes
1 answer

How to terminate a process on SIGPIPE?

I have a server program that uses IPv4. The server has to attend multiple calls from client, so it creates a child process every time it accepts a client socket connection to deal with the client. The child process is expected to read from client…
0
votes
0 answers

How can I avoid my Docker container running R script to halt after SIGPIPE error?

I have a Docker container running a R script "successfully" (i.e. the script is completed) on AWS but returning the following error: Error: ignoring SIGPIPE signal Execution halted Here is the R script (curated after I narrowed down where the…
Greg
  • 11
  • 2
0
votes
1 answer

General signal question with regards to expected behavior

Scenario 1 Lets say the following scenario exists. My program makes a call to a 3rd party library which in turn calls another 3rd party library which turns around and makes OS calls. MyProgram | some3rdPartyFunction() ---> 3rd party…
Unhandled Exception
  • 1,427
  • 14
  • 30