[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding an option to avoid SIGPIPE for all file descriptors
On Jan 24, 2012, at 3:26 41AM, David Laight wrote:
> On Mon, Jan 23, 2012 at 10:58:59PM -0500, Steven Bellovin wrote:
>>> I also wonder whether we should also have a note that disabled SIGPIPE.
>>> similar to what paxctl does.
>> You mean a system-wide flag? That would worry me; I think it would have
>> bad effects, since anything that did
>> a | b
>> would be liable to cause infinite loops if 'a' didn't check the return
>> code on the write() or printf() or what have you -- and such programs are
>> very common.
> I think that is why SIGPIPE exists (but I suspect some shells disable
> it because I've sometimes seen - but not investigated - programs
> not exiting).
> In generate you want that behaviour for shell pipelines, and probably
> don't want it anywhere else.
> OTOH I've NFI when/why the 'feature' got attached to TCP sockets.
> I don't remember it appliying to SYSV.
4.2bsd, the first BSD with TCP/IP support.
--Steve Bellovin, https://www.cs.columbia.edu/~smb
Main Index |
Thread Index |