Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2015 09:47:26 +0100
From:      David Chisnall <theraven@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Ed Schouten <ed@nuxi.nl>, Ed Schouten <ed@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r285404 - head/sys/compat/cloudabi
Message-ID:  <6DE293FA-EE2B-4614-A4FF-E680F976FFB6@FreeBSD.org>
In-Reply-To: <20150711205611.GC2404@kib.kiev.ua>
References:  <201507111941.t6BJfV1a072539@repo.freebsd.org> <20150711194732.GB2404@kib.kiev.ua> <CABh_MK=wtpr-zn3N8dV5k7UnVNjv1XZ9ikdmVi8sg-faVr4jQA@mail.gmail.com> <20150711205611.GC2404@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11 Jul 2015, at 21:56, Konstantin Belousov <kostikbel@gmail.com> =
wrote:
>=20
>> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6DE293FA-EE2B-4614-A4FF-E680F976FFB6>