acme: clean up environment after exec

Make up for the lack of a real rfork(RFENVG).
This commit is contained in:
Russ Cox 2024-04-06 11:13:24 -04:00
parent be7c68f695
commit d5b2552b95

View file

@ -1532,6 +1532,11 @@ runproc(void *argvp)
iseditcmd = (uintptr)argv[9];
free(argv);
unsetenv("acmeaddr");
unsetenv("winid");
unsetenv("%");
unsetenv("samfile");
t = s;
while(*t==' ' || *t=='\n' || *t=='\t')
t++;
@ -1728,6 +1733,10 @@ Hard:
rcarg[2] = t;
rcarg[3] = nil;
ret = threadspawnd(sfd, rcarg[0], rcarg, dir);
unsetenv("acmeaddr");
unsetenv("winid");
unsetenv("%");
unsetenv("samfile");
free(dir);
if(ret >= 0){
if(cpid)