|
|
SIGPIPE signal is sent by kernel to programs whose remote end closes or shuts down the socket and your program still tries to send/write operations on closed connection. The default signal handler terminates your program at this situation because of default behavior.
Solution 1:
Ignore the signal using ‘signal(SIGPIPE, SIG_IGN)’
then catch the EPIPE error which will return from the send/write operation due to a broken pipe.
Solution 2:
Pass MSG_NOSIGNAL flag to send(). This is results as same as solution 1
Related posts:
- Fatal Error Installation ended prematurely because of an error If you get an error like this in an installation...
- Failed to access IIS metabase error solution select start -> run write “cmd” and press enter write...
- High CPU usage solution for vmware on linux (files on NTFS) If you have high cpu usage problem for your vmware...
- Sample Linux Driver (module) I am generally writing linux drivers for embedded systems for...
- How to use windows shares with Linux Samba First of all you need to share some directories on...
Comments
Leave a comment Trackback