diff options
author | rsc <devnull@localhost> | 2004-05-14 17:45:39 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-05-14 17:45:39 +0000 |
commit | f1bfc54e12efe488e355debf696dbd999c62fe07 (patch) | |
tree | 4037221d2300fe3a8925f00da6984b26995158a2 | |
parent | 1a8f27c35024af7b4ed857a388d20f0a4a560db0 (diff) | |
download | plan9port-f1bfc54e12efe488e355debf696dbd999c62fe07.tar.gz plan9port-f1bfc54e12efe488e355debf696dbd999c62fe07.tar.bz2 plan9port-f1bfc54e12efe488e355debf696dbd999c62fe07.zip |
More little bug fixes
-rw-r--r-- | plumb/basic | 2 | ||||
-rw-r--r-- | rcmain | 6 | ||||
-rw-r--r-- | src/cmd/mk/unix.c | 8 | ||||
-rw-r--r-- | src/cmd/mkfile | 2 | ||||
-rw-r--r-- | src/cmd/rc/plan9ish.c | 1 | ||||
-rw-r--r-- | src/lib9/9proc.h | 2 | ||||
-rw-r--r-- | src/lib9/_p9proc.c | 13 | ||||
-rw-r--r-- | src/lib9/fork.c | 1 | ||||
-rw-r--r-- | src/libthread/exit.c | 3 |
9 files changed, 31 insertions, 7 deletions
diff --git a/plumb/basic b/plumb/basic index e9a17fa9..8e9ec5c2 100644 --- a/plumb/basic +++ b/plumb/basic @@ -38,7 +38,7 @@ data matches '[a-zA-Z¡-0-9_\-./]+' data matches '([a-zA-Z¡-0-9_\-./]+)\.(jpe?g|JPE?G|gif|GIF|tiff?|TIFF?|ppm|bit|png|PNG)' arg isfile $0 plumb to image -plumb start qiv -t $0 +plumb start qiv -t $file # postscript/pdf/dvi go to page but not over the a plumb port # the port is here for reference but is unused @@ -10,7 +10,7 @@ case 1 prompt=($prompt ' ') } if(~ $rcname ?.out ?.rc */?.rc */?.out) prompt=('broken! ' ' ') -if(flag p) path=(/bin) +if(flag p) path=(/bin /usr/bin) if not{ finit if(~ $#path 0) { @@ -28,9 +28,9 @@ if(! ~ $#cflag 0){ if not if(flag i){ if(~ $TERM 9term){ if(~ $#'fn#cd' 0) - fn cd { builtin cd $1 && label `{pwd} } + fn cd { builtin cd $1 && flag i && awd } } - if(flag l && /bin/test -r $home/lib/profile) . $home/lib/profile + if(flag l && test -r $home/lib/profile) . $home/lib/profile status='' if(! ~ $#* 0) . $* . -i '/dev/stdin' diff --git a/src/cmd/mk/unix.c b/src/cmd/mk/unix.c index 00bee01e..9e4fcea9 100644 --- a/src/cmd/mk/unix.c +++ b/src/cmd/mk/unix.c @@ -23,12 +23,20 @@ readenv(void) Word *w; for(p = environ; *p; p++){ +/* rsc 5/5/2004 -- This misparses fn#cd={whatever} s = shname(*p); if(*s == '=') { *s = 0; w = newword(s+1); } else w = newword(""); +*/ + s = strchr(*p, '='); + if(s){ + *s = 0; + w = newword(s+1); + } else + w = newword(""); if (symlook(*p, S_INTERNAL, 0)) continue; s = strdup(*p); diff --git a/src/cmd/mkfile b/src/cmd/mkfile index caf7a66c..e5ddf684 100644 --- a/src/cmd/mkfile +++ b/src/cmd/mkfile @@ -5,7 +5,7 @@ SHORTLIB=sec fs mux regexp9 thread bio 9 <$PLAN9/src/mkmany -BUGGERED='CVS|faces|factotum|mailfs|scat|upas|vac|venti|lex' +BUGGERED='CVS|faces|factotum|mailfs|scat|upas|vac|venti|lex|vncv' DIRS=`ls -l |sed -n 's/^d.* //p' |egrep -v "^($BUGGERED)$"` <$PLAN9/src/mkdirs diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c index 6644778c..af1e449d 100644 --- a/src/cmd/rc/plan9ish.c +++ b/src/cmd/rc/plan9ish.c @@ -34,7 +34,6 @@ char Fdprefix[]="/dev/fd/"; void execfinit(void); void execbind(void); void execmount(void); -void execnewpgrp(void); builtin Builtin[]={ "cd", execcd, "whatis", execwhatis, diff --git a/src/lib9/9proc.h b/src/lib9/9proc.h index 663d65b6..1f471b6f 100644 --- a/src/lib9/9proc.h +++ b/src/lib9/9proc.h @@ -18,3 +18,5 @@ struct Uproc extern Uproc *_p9uproc(int); extern void _p9uprocdie(void); +extern void _clearuproc(void); + diff --git a/src/lib9/_p9proc.c b/src/lib9/_p9proc.c index c492ae15..9543bf24 100644 --- a/src/lib9/_p9proc.c +++ b/src/lib9/_p9proc.c @@ -18,6 +18,19 @@ static Uproc *alluproc[PIDHASH]; static int allupid[PIDHASH]; static Lock uproclock; +void +_clearuproc(void) +{ + int i; + + /* called right after fork - no locking needed */ + for(i=0; i<PIDHASH; i++) + if(alluproc[i] != T && alluproc[i] != 0) + free(alluproc[i]); + memset(alluproc, 0, sizeof alluproc); + memset(allupid, 0, sizeof allupid); +} + Uproc* _p9uproc(int inhandler) { diff --git a/src/lib9/fork.c b/src/lib9/fork.c index 99e84dc9..4dbff87b 100644 --- a/src/lib9/fork.c +++ b/src/lib9/fork.c @@ -9,6 +9,7 @@ p9fork(void) int pid; pid = fork(); + _clearuproc(); _p9uproc(0); return pid; } diff --git a/src/libthread/exit.c b/src/libthread/exit.c index 1f9c26ae..cf34c60c 100644 --- a/src/libthread/exit.c +++ b/src/libthread/exit.c @@ -55,8 +55,9 @@ threadexitsall(char *exitstr) _threaddebug(DBGSCHED, "threadexitsall kill %d", pid[i]); if(pid[i]==0 || pid[i]==-1) fprint(2, "bad pid in threadexitsall: %d\n", pid[i]); - else if(pid[i] != mypid) + else if(pid[i] != mypid){ kill(pid[i], SIGTERM); + } } /* leave */ |