I have a server / client application in a Linux box. If the server is down when the client tries to send a request, I get SIGPIPE and the application terminates.
How to check if a server is accessible on a socket before trying to write?
It should also be noted that I do not want to catch SIGPIPE, because the client is indeed part of a common object that is used by many applications that may or may not already define their own signal processing methods.
thanks
steveo225
source share