Mercurial > hg > toybox
diff toys/oneit.c @ 186:25447caf1b4b
Change command main() functions to return void, and exit(toys.exitval) from
the toybox infrastructure instead. Eliminates a return call from each command.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 29 Nov 2007 18:14:37 -0600 |
parents | 1e8f4b05cb65 |
children | 30a6db5a95c2 |
line wrap: on
line diff
--- a/toys/oneit.c Thu Nov 29 17:49:50 2007 -0600 +++ b/toys/oneit.c Thu Nov 29 18:14:37 2007 -0600 @@ -16,7 +16,7 @@ // PID 1 then reaps zombies until the child process it spawned exits, at which // point it calls sync() and reboot(). I could stick a kill -1 in there. -int oneit_main(void) +void oneit_main(void) { int i; pid_t pid; @@ -38,7 +38,7 @@ open("/dev/tty0",O_RDWR); } - // Can't xexec() here because we vforked so we don't want to error_exit(). + // Can't xexec() here, because we vforked so we don't want to error_exit(). toy_exec(toys.optargs); execvp(*toys.optargs, toys.optargs); _exit(127);