From 64aa0f9c06c4215f64f6385d0afe38f02effd888 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 12 Apr 2020 23:23:21 -0500 Subject: Minor cleanup. --- toys/other/oneit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toys/other') 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(). -- cgit v1.2.3