Questions tagged [epipe]

EPIPE is a return value (errno) when writing to a file under Unix system. Its an attempt to write to a broken pipe.

When a process ignores the SIGPIPE, the writing system call returns with an EPIPE error. So processes wanting to handle the broken pipe manually would typically ignore SIGPIPE and take action upon a EPIPE error.

SIGPIPE is for situations like this:

grep "pattern" < reallyhugefile | head

grep might print millions of lines, but head only reads 10 then quits. Once head closes the read-end and quits, grep gets SIGPIPE, which kills it, forcing it to quit early instead of processing the entire file uselessly.

If you don't want your program to be killed, handle or block SIGPIPE yourself. You will start getting write-errors with errno set to EPIPE instead.

https://unix.stackexchange.com/questions/84813/what-makes-a-unix-process-die-with-broken-pipe

32 questions
0
votes
1 answer

NodeJs Error: write EPIPE http unix socket domain LXD API

The whole idea is to use the LXD RESTful API over a unix socket for local operations. The following code runs well once for each 2 or 3 with errors. I don't know if is related to node.js or is related the lxd api. The Output with error problem with…
shnicolau
  • 31
  • 4
0
votes
0 answers

send, recvfrom, threads, "Broken Pipe" and SO_RCVTIMEO bug

I have a server coded in C++ running on ubuntu 10.04, currently in production, which exhibit a weird bug. Context : Each client connecting to the server has one socket and 2 threads 1 thread for writing to the socket, 1 thread for reading from the…
R4f
  • 31
  • 2
1 2
3