From 53b2daab9413fe8dab202fd72e5a238594cb0371 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 9 Sep 2020 04:32:29 -0500 Subject: Use flag macros and document -rn options. --- toys/other/oneit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'toys/other') diff --git a/toys/other/oneit.c b/toys/other/oneit.c index fe657fb8..4c8bb1f6 100644 --- a/toys/other/oneit.c +++ b/toys/other/oneit.c @@ -8,7 +8,7 @@ config ONEIT bool "oneit" default y help - usage: oneit [-p] [-c /dev/tty0] command [...] + usage: oneit [-prn3] [-c CONSOLE] [COMMAND...] Simple init program that runs a single supplied command line with a controlling tty (so CTRL-C can kill it). @@ -16,6 +16,7 @@ config ONEIT -c Which console device to use (/dev/console doesn't do CTRL-C, etc) -p Power off instead of rebooting when command exits -r Restart child when it exits + -n No reboot, just relaunch command line -3 Write 32 bit PID of each exiting reparented process to fd 3 of child (Blocking writes, child must read to avoid eventual deadlock.) @@ -68,7 +69,7 @@ void oneit_main(void) // Setup signal handlers for signals of interest for (i = 0; i