I'm working with some code that needs to be safe against killing the caller due to SIGPIPE
, but the only socket writes it's performing are going to datagram sockets (both UDP and Unix domain datagram sockets). Do I need to worry about SIGPIPE
? I'm using connect
on the socket, but preliminary testing (on Linux) showed that I just get ECONNREFUSED
on send if there's nobody listening on the Unix domain socket. Not sure what happens with UDP.
I can wrap the whole thing in hacks to get rid of SIGPIPE
, but if it's a non-issue I'd rather save the overhead and keep the code complexity down.
sendto
rather thanwrite
so I can pass that flag that disablesSIGPIPE
. – Sheronsherourd