adding equivalent of SO_NOSIGPIPE on linux