Mike Kupfer writes:
[EPIPE] is better than [SIGPIPE] because it makes a crash less
> And you still need a *global* ignore on the SIGPIPE.
No, the Lstream code can ignore SIGPIPE just when writing.
No, it *can't*. If that were safe, then the current code would be
safe (or could be made safe). The current code doesn't crash
*because* we catch SIGPIPE, it crashes because we get a SIGPIPE where
we don't expect it. If we don't ignore SIGPIPE *all* the places where
we need to handle EPIPE, then we're no better off than we were with
Another way to put it is that your proposal (which I admit has a good
chance of being as safe or safer as my patch) depends for its safety
on ignoring SIGPIPE at a very low level. I think that is likely to
result in a perceptible slowdown in I/O because of all the system
calls needed. So the obvious solution is to ignore (or catch) SIGPIPE
globally, which will mean only one system call is needed, at XEmacs
I can imagine various scenario where this could happen. I think
unlikely, but I've made a note to do some checking.
Sure. The scenario that caught me apparently requires (1) starting a
new process every few milliseconds, (2) in a broken way, and (3) on a
multicore system. (I'm not entirely sure about (3).) AFAIK nobody
else has reported it.
XEmacs-Patches mailing list