Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: ... >> s/is/may be/ >> Early reader termination may still deserve a diagnostic. >> Or it could be that POSIX requires the application to diagnose EPIPE, >> regardless ;-) > > I disagree here. If early reader termination leads to a diagnostic in this > case, the diagnostic is timing dependent (depends which of the CPU cores > executing the reader process and the writer process is more loaded); this > is never what you want. > > POSIX does not specify anthing here, because it essentially says that during > the operation specified by POSIX the SIGPIPE handler is set to SIG_DFL.
POSIX does specify the behavior of applications even when SIGPIPE is ignored. It requires that they diagnose error conditions (which includes EPIPE).