vt: rfork environment varibles (thanks fshahriar)

vt sets several environment variables ($TERM, $COLS, $LINES)
after exiting. This change rforks the environment so that this
detritus doesn't get left behind.
This commit is contained in:
Ori Bernstein 2020-12-18 19:23:48 -08:00
parent 2db3642b8d
commit 4dc437c076

View file

@ -298,6 +298,8 @@ threadmain(int argc, char **argv)
break;
}ARGEND;
if(rfork(RFENVG) < 0)
sysfatal("rfork: %r");
quotefmtinstall();
notify(catch);
atexit(shutdown);