scsh-users
[Top] [All Lists]

SIGPIPE

To: scsh-bugs@martigny.ai.mit.edu
Subject: SIGPIPE
From: Alan Bawden <Alan@lcs.mit.edu>
Date: Fri, 4 Apr 1997 19:02:04 -0500
Sender: Alan@lcs.mit.edu
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.

<Prev in Thread] Current Thread [Next in Thread>