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.
Hi
This is a exercise question from Unix network programming vol2.
Why the SIGPIPE signal is generated only for writers when readers disappear.
why not it is generated for readers when writer disappears.
I guess, if the writer didn't get any response like the reader gets EOF,
it will... (4 Replies)
catch signal SIGPIPE ,print errno but it's value equal to 2(ENOENT)
#define ENOENT 2 /* No such file or directory */
is it should be EPIPE ?
#define EPIPE 32 /* Broken pipe */
Thanks ! (7 Replies)
I' m note very expert in the reliable manage of signal... but in my server I must manage SIGPIPE for the socket and SIGTERM...
I've wrote this but there is something wrong... Can someone explain me with some example the reliable management of signal??
This is what I've wrote in the server
... (2 Replies)
On a Solaris 8 print server we're continuously (every 2 minutes or so) getting these messages in the logs:
printd: Warning: Received SIGPIPE; continuing
I've applied this patch and restarted the printd daemon, but it doesn't help: #109320-22: SunOS 5.8: lp patch
Does anyone have any idea what... (4 Replies)
Hi folks,
Can anyone assist with pointers for the following snag?
We have custom method (IBM-supplied) for running the audit subsystem on 5.1-07
/etc/security/audit objects, events and config have been edited, and the /etc/security/audit/streamcmds contains the following routine;
... (1 Reply)