8409 Want MSG_NOSIGNAL to prevent SIGPIPE
Review Request #590 — Created June 18, 2017 and submitted
Information | |
---|---|
wiedi | |
illumos-gate | |
Reviewers | |
general | |
The MSG_NOSIGNAL flag prevents SIGPIPE being generated when an attempt
to send on a stream-oriented socket is made that is no longer connected.
It is part of POSIX.1-2008:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/send.html
This change includes a test-case. I booted a system with this patch and executed the os-test suite.
-
-
usr/src/uts/common/fs/sockfs/sockcommon.c (Diff revision 1) I suspect the answer is "no", but is there ever a case where MSG_NOSIGNAL would reach this path?
If you hadn't thought of this case, you ought to think about whether or not the MSG_NOSIGNAL logic needs to be here too. (Again, I suspect no, but knowing why no is the right answer is useful.)
-
Generally looks good, especially like the test for it.
Would it make sense to also add a case to the symbols test suite to ensure that the symbol is defined under POSIX 2008?
-
usr/src/uts/common/sys/socket.h (Diff revision 1) My one question here is about the exposure of this symbol. I'd expect it to be exposed under POSIX 2008; it's unclear to me that its correct for us to expose it in other contexts -- but I do see that we are exposing the other symbols without any guards.
Does POSIX reserve the MSG_xxx namespace entirely for implementation use?
I think the XPGv2 section, and comments, are probably best removed btw. XPGv2 compliance is not something we really care all that much about and I think the grouping is somewhat artificial and incorrect -- in fact some of the other symbols are covered under other standards, and we don't call those out.
Change Summary:
feedback from Garrett and Patrick