vere: implements -x (exit immediately after boot)

This commit is contained in:
Joe Bryan 2019-10-04 16:29:36 -07:00
parent 9fad3153f9
commit 39f84d2cf1

View File

@ -565,6 +565,14 @@ _fork_into_background_process()
exit(WEXITSTATUS(status));
}
/* _stop_on_boot_completed_cb(): exit gracefully after boot is complete
*/
static void
_stop_on_boot_completed_cb()
{
u3_pier_exit(u3_pier_stub());
}
c3_i
main(c3_i argc,
c3_c** argv)
@ -596,6 +604,10 @@ main(c3_i argc,
return 0;
}
if ( c3y == u3_Host.ops_u.tex ) {
u3_Host.bot_f = _stop_on_boot_completed_cb;
}
#if 0
if ( 0 == getuid() ) {
chroot(u3_Host.dir_c);