i did some looking through the plan 9 source.
(it's great to have it all in one place.)

all of this group, to a quick scan, should work
if the note is removed.  many can lose their
note handlers, because the the pipe signal is
the only there to catch writes on closed pipes.

grep 'closed pipe' `{find . | grep '\.[chy]$'} 
./9/port/devpipe.c: *  a write to a closed pipe causes a note to be sent to
./9/port/devpipe.c:                     postnote(up, 1, "sys: write on closed 
pipe", NUser);
./9/port/devpipe.c:                     postnote(up, 1, "sys: write on closed 
pipe", NUser);
./ape/lib/ap/plan9/signal.c:    {"sys: write on closed pipe",           
SIGPIPE},
./cmd/con/con.c:        if(strstr(msg, "closed pipe")
./cmd/sam/plan9.c:      if(bpipeok && strcmp(s, "sys: write on closed pipe") == 
0)
./cmd/srv.c:    if(strstr(c, "write on closed pipe") == 0){
./cmd/srv.c:            fprint(2, "write on closed pipe\n");
./cmd/unix/drawterm/kern/devpipe.c: *  a write to a closed pipe causes a note 
to be sent to
./cmd/unix/drawterm/kern/devpipe.c:                     postnote(up, 1, "sys: 
write on closed pipe", NUser);
./cmd/unix/drawterm/kern/devpipe.c:                     postnote(up, 1, "sys: 
write on closed pipe", NUser);
./cmd/upas/common/libsys.c: *  catch a write on a closed pipe
./cmd/upas/common/libsys.c:     static char *foo = "sys: write on closed pipe";
./cmd/upas/imap4d/imap4d.c:     if(strstr(msg, "closed pipe") != nil)
./cmd/upas/smtp/smtp.c: if(strstr(msg, "closed pipe")){
./cmd/upas/smtp/smtp.c:                 syslog(0, "smtp.fail", "%s closed pipe 
to %s", deliverytype(), farend);
./cmd/upas/smtp/smtp.c:         /* call _exits() to prevent Bio from trying to 
flush closed pipe */
./libauth/newns.c:static char *wocp = "sys: write on closed pipe";

needs fixing:
./cmd/sort.c:   if(strncmp(s, "sys: write on closed pipe", 25) == 0)

there's a write that is not checked for errors.  this is already a bug.
patch already submitted.

- erik

Reply via email to