URI: 
       twin: better SIGPIPE handling - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 65a34c7fac1524cb3f40189f1bff8c3226d80710
   DIR parent e465991ea6c7d2b9f52cabf398b9b087a0b25427
  HTML Author: Russ Cox <rsc@swtch.com>
       Date:   Tue,  6 Jan 2009 14:42:41 -0800
       
       win: better SIGPIPE handling
       
       Diffstat:
         M src/cmd/9term/win.c                 |      19 +++++++++----------
       
       1 file changed, 9 insertions(+), 10 deletions(-)
       ---
   DIR diff --git a/src/cmd/9term/win.c b/src/cmd/9term/win.c
       t@@ -93,15 +93,6 @@ usage(void)
                threadexitsall("usage");
        }
        
       -int
       -nopipes(void *v, char *msg)
       -{
       -        USED(v);
       -        if(strcmp(msg, "sys: write on closed pipe") == 0)
       -                return 1;
       -        return 0;
       -}
       -
        void
        waitthread(void *v)
        {
       t@@ -157,7 +148,15 @@ threadmain(int argc, char **argv)
                        }
                }
        
       -        notedisable("sys: write on closed pipe");
       +        /*
       +         * notedisable("sys: write on closed pipe");
       +         * not okay to disable the note, because that
       +         * gets inherited by the subshell, so that something
       +         * as simple as "yes | sed 10q" never exits.
       +         * call notifyoff instead.  (is notedisable ever safe?)
       +         */
       +        notifyoff("sys: write on closed pipe");
       +
                noteenable("sys: child");
                notify(hangupnote);