[K42-discussion] Another problem with asynchrony
Paul H. Hargrove
PHHargrove at lbl.gov
Thu Oct 13 03:37:58 EST 2005
Christopher Yeoh wrote:
>At 2005/10/11 16:30-0400 Bryan S Rosenburg writes:
>
>>Do you know if that's a Posix requirement, a Linux requirement, or simply
>>Linux de facto behavior?
>>
>
>I don't believe that its a POSIX requirement, but under Linux (and I
>think BSD) because of the ways signals are delievered, you will always
>get the SIGPIPE signal before EPIPE is returned.
>
>
While the raise() requirement is in ISO C, I didn't find anything in my
search of POSIX that requires SIGPIPE be "noticed" by the app prior to
return from (p)write. It does use the term "synchronous" in relation to
SIGPIPE, but has defined that as "thread-specific" (delivered to the
thread doing the write() as opposed to an arbitrary thread of the process).
>I'm guessing that most Linux apps would assume this, so would be a bit
>surprised if it didn't occur. That being said I think most apps just
>ignore SIGPIPE.
>
>
I agree with the general idea of this thread that "principle of lease
suprise" is good and that in this case that probably translates to "do
what Linux does".
>Chris
>
--
Paul H. Hargrove PHHargrove at lbl.gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
More information about the K42-discussion
mailing list