aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-04-12 23:23:21 -0500
committerRob Landley <rob@landley.net>2020-04-12 23:23:21 -0500
commit64aa0f9c06c4215f64f6385d0afe38f02effd888 (patch)
treefe9c50e9795fb1abf8e9127e4d70f3aeb658781e /toys/other
parentefd16b24e10fb78a176a9e6a43f95065c78a38d8 (diff)
downloadtoybox-64aa0f9c06c4215f64f6385d0afe38f02effd888.tar.gz
Minor cleanup.
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/oneit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toys/other/oneit.c b/toys/other/oneit.c
index c400f6d6..fe657fb8 100644
--- a/toys/other/oneit.c
+++ b/toys/other/oneit.c
@@ -39,7 +39,7 @@ GLOBALS(
//
// - Fork a child (PID 1 is special: can't exit, has various signals blocked).
// - Do a setsid() (so we have our own session).
-// - In the child, attach stdio to /dev/tty0 (/dev/console is special)
+// - In the child, attach stdio to TT.c (/dev/console is special)
// - Exec the rest of the command line.
//
// PID 1 then reaps zombies until the child process it spawned exits, at which
@@ -92,12 +92,12 @@ void oneit_main(void)
oneit_signaled((toys.optflags & FLAG_p) ? SIGUSR2 : SIGTERM);
} else {
- // Redirect stdio to /dev/tty0, with new session ID, so ctrl-c works.
+ // Redirect stdio to TT.c, with new session ID, so ctrl-c works.
setsid();
for (i=0; i<3; i++) {
close(i);
// Remember, O_CLOEXEC is backwards for xopen()
- xopen_stdio(TT.c ? TT.c : "/dev/tty0", O_RDWR|O_CLOEXEC);
+ xopen_stdio(TT.c ? : "/dev/tty0", O_RDWR|O_CLOEXEC);
}
// Can't xexec() here, we vforked so we don't want to error_exit().