1. The documentation doesn't mention set-signal-handler!. Why would I
need that? Because:
2. Subprocesses seem to always be started with SIGPIPE set to SIG_IGN.
This makes pipelines behave badly if a consumer closes the pipe before
a producer is finished. (The producer gets an EPIPE error, which many
programs don't expect.) The default behavior for SIGPIPE, which is to
simply terminate the process, would be better.
I realize that scsh itself doesn't want the default behavior of
SIGPIPE. (In fact, it's a pain in the ass if you're trying to do any
real network programming.) But there are a zillion little Unix filter
programs that behave a lot better if SIGPIPE has it's default behavior.
So scsh should probably set SIGPIPE back to the default for any
children it spawns.
|