* [9front] [PATCH] vt: rfork environment varibles
@ 2020-12-19 2:07 Fazlul Shahriar
2020-12-19 3:26 ` ori
0 siblings, 1 reply; 2+ messages in thread
From: Fazlul Shahriar @ 2020-12-19 2:07 UTC (permalink / raw)
To: 9front
Hi,
The patch below fixes the issue of vt(1) leaving behind some
environment variables defined (e.g. $TERM, $COLS, $LINES) after
it exits.
Incidentally, is there a better way to check if a program is
running inside vt(1) besides checking if $TERM is defined?
fhs
diff -r bb188b04d462 sys/src/cmd/vt/main.c
--- a/sys/src/cmd/vt/main.c Fri Dec 18 07:16:29 2020 -0800
+++ b/sys/src/cmd/vt/main.c Fri Dec 18 20:45:13 2020 -0500
@@ -298,6 +298,8 @@
break;
}ARGEND;
+ if(rfork(RFENVG) < 0)
+ sysfatal("rfork: %r");
quotefmtinstall();
notify(catch);
atexit(shutdown);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] [PATCH] vt: rfork environment varibles
2020-12-19 2:07 [9front] [PATCH] vt: rfork environment varibles Fazlul Shahriar
@ 2020-12-19 3:26 ` ori
0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2020-12-19 3:26 UTC (permalink / raw)
To: fshahriar, 9front
Quoth Fazlul Shahriar <fshahriar@gmail.com>:
> Hi,
>
> The patch below fixes the issue of vt(1) leaving behind some
> environment variables defined (e.g. $TERM, $COLS, $LINES) after
> it exits.
Seems good, committed.
> Incidentally, is there a better way to check if a program is
> running inside vt(1) besides checking if $TERM is defined?
>
Not that I'm aware of. I think $TERM is the best option,
and it's fairly portable to unix.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-19 3:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19 2:07 [9front] [PATCH] vt: rfork environment varibles Fazlul Shahriar
2020-12-19 3:26 ` ori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).