More little bug fixes
This commit is contained in:
parent
1a8f27c350
commit
f1bfc54e12
9 changed files with 31 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -18,3 +18,5 @@ struct Uproc
|
|||
|
||||
extern Uproc *_p9uproc(int);
|
||||
extern void _p9uprocdie(void);
|
||||
extern void _clearuproc(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ p9fork(void)
|
|||
int pid;
|
||||
|
||||
pid = fork();
|
||||
_clearuproc();
|
||||
_p9uproc(0);
|
||||
return pid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue