On 11 Jul 2015, at 21:56, Konstantin Belousov <[email protected]> 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

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to