From: Fazlul Shahriar <fshahriar@gmail.com>
To: 9front@9front.org
Subject: [9front] [PATCH] vt: rfork environment varibles
Date: Fri, 18 Dec 2020 21:07:02 -0500 [thread overview]
Message-ID: <X91gRjqih+5SbhOx@delta.localdomain> (raw)
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);
next reply other threads:[~2020-12-19 2:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-19 2:07 Fazlul Shahriar [this message]
2020-12-19 3:26 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X91gRjqih+5SbhOx@delta.localdomain \
--to=fshahriar@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).