svn commit: r285404 - head/sys/compat/cloudabi

David Chisnall theraven at FreeBSD.org
Sun Jul 12 08:47:14 UTC 2015


On 11 Jul 2015, at 21:56, Konstantin Belousov <kostikbel at gmail.com> wrote:
> 
>> Bucket 2: The system call could also just fail and return an error
>> (MSG_NOSIGPIPE).
> SIGPIPE exists to ensure that naive programs do something reasonable
> when their stdout suddenly goes away. Or, transposing the PoV, it allows
> to write useful and well-behaving programs while ignoring complications.
> If all programs must be aware of the special error code from write which
> indicates that nobody listens to the output anymore, it would cause
> unneeded code copy/pasted all over the src.

Presumably this could be handled in userspace in the system call wrappers if someone wanted to do it that way - the syscall wrapper would check for the error condition and call the system call handler (though if you wanted the mcontext to be meaningful for the syscall return or support separate signal stacks then this would be fairly complex).

David



More information about the svn-src-all mailing list