mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
acme: clean up environment after exec
Make up for the lack of a real rfork(RFENVG).
This commit is contained in:
parent
be7c68f695
commit
d5b2552b95
1 changed files with 9 additions and 0 deletions
|
@ -1532,6 +1532,11 @@ runproc(void *argvp)
|
||||||
iseditcmd = (uintptr)argv[9];
|
iseditcmd = (uintptr)argv[9];
|
||||||
free(argv);
|
free(argv);
|
||||||
|
|
||||||
|
unsetenv("acmeaddr");
|
||||||
|
unsetenv("winid");
|
||||||
|
unsetenv("%");
|
||||||
|
unsetenv("samfile");
|
||||||
|
|
||||||
t = s;
|
t = s;
|
||||||
while(*t==' ' || *t=='\n' || *t=='\t')
|
while(*t==' ' || *t=='\n' || *t=='\t')
|
||||||
t++;
|
t++;
|
||||||
|
@ -1728,6 +1733,10 @@ Hard:
|
||||||
rcarg[2] = t;
|
rcarg[2] = t;
|
||||||
rcarg[3] = nil;
|
rcarg[3] = nil;
|
||||||
ret = threadspawnd(sfd, rcarg[0], rcarg, dir);
|
ret = threadspawnd(sfd, rcarg[0], rcarg, dir);
|
||||||
|
unsetenv("acmeaddr");
|
||||||
|
unsetenv("winid");
|
||||||
|
unsetenv("%");
|
||||||
|
unsetenv("samfile");
|
||||||
free(dir);
|
free(dir);
|
||||||
if(ret >= 0){
|
if(ret >= 0){
|
||||||
if(cpid)
|
if(cpid)
|
||||||
|
|
Loading…
Reference in a new issue