[K42-discussion] Another problem with asynchrony
Bryan S Rosenburg
rosnbrg at us.ibm.com
Wed Oct 12 22:38:37 EST 2005
"Paul H. Hargrove" <PHHargrove at lbl.gov> wrote on 10/11/2005 05:30:54 PM:
> ISO C says
>
> If a signal handler is called, the raise function shall not return until
after
> the signal handler does.
That sounds like a requirement on signals generated by the program itself.
It's still not clear to me that it applies to a SIGPIPE generated in the
operating system. But I'm just splitting hairs. We usually want to mimic
Linux behavior whether or not that behavior is required by spec.
>
> I am not imagining that write will "care" that it is talking to a pipe,
> just that the return value is EPIPE:
>
> if (result == EPIPE) raise(SIGPIPE);
This is still a completely superfluous check if the write is to a regular
file. Yes, it's just a cycle or two at most, but once it's in there
people will be tempted to add other things that only apply in special
scenarios. As far as I'm concerned, the whole SIGPIPE thing is an ugly
wart, and I'd like to see its implementation confined to the server that
implements pipes.
- Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/k42-discussion/attachments/20051012/48862e23/attachment.htm
More information about the K42-discussion
mailing list