Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了避免在 mac osx 中使用 SIGPIPE,我尝试使用该标志
SO_NOSIGPIPE
这相当于
MSG_NOSIGNAL
在linux中。但是仍然会出现 SIGPIPE 错误。如何避免呢?
提前致谢。:)
忽略如何SIGPIPE工作?
SIGPIPE
signal(SIGPIPE, SIG_IGN);