plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 429f8aa4c12c7fb04a0285ca31db5d0ab88b53d8
parent 5810cad0c374b5ad6736949aa8b04ecdee760681
Author: rsc <devnull@localhost>
Date:   Tue, 15 Feb 2005 05:04:01 +0000

ignore tty notes; still not 100% right

Diffstat:
Msrc/cmd/acme/acme.c | 17+++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c @@ -288,6 +288,14 @@ readfile(Column *c, char *s) textsetselect(&w->tag, w->tag.file->b.nc, w->tag.file->b.nc); } +char *ignotes[] = { + "sys: write on closed pipe", + "sys: ttin", + "sys: ttou", + "sys: tstp", + nil +}; + char *oknotes[] ={ "delete", "hangup", @@ -303,10 +311,12 @@ shutdown(void *v, char *msg) { int i; - if(strcmp(msg, "sys: write on closed pipe") == 0) - return 1; - USED(v); + + for(i=0; ignotes[i]; i++) + if(strncmp(ignotes[i], msg, strlen(ignotes[i])) == 0) + return 1; + killprocs(); if(!dumping && strcmp(msg, "kill")!=0 && strcmp(msg, "exit")!=0 && getpid()==mainpid){ dumping = TRUE; @@ -316,7 +326,6 @@ shutdown(void *v, char *msg) if(strncmp(oknotes[i], msg, strlen(oknotes[i])) == 0) threadexitsall(msg); print("acme: %s\n", msg); - abort(); return 0; }