OSX does not know MSG_NOSIGNAL, and provides its own non-standard mechanism instead. I guess Apple hates standards.
Unified · Split
| @@ -180,6 +180,10 @@ int ff_socket(int af, int type, int proto) · 179 unmodified lines | |||
| 180 | } | 180 | } |
| 181 | #endif | 181 | #endif |
| 182 | } | 182 | } |
| 183 | #ifdef SO_NOSIGPIPE | ||
| 184 | if (fd != -1) | ||
| 185 | setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int)); | ||
| 186 | #endif | ||
| 183 | return fd; | 187 | return fd; |
| 184 | } | 188 | } |
| 185 | 189 | ||