Never returning inttab line
Denys Vlasenko
vda.linux at googlemail.com
Sun Jun 1 21:32:44 UTC 2014
On Saturday 31 May 2014 01:42, Felipe de Andrade Neves Lavratti wrote:
> Recently I started working in a system where there is a never returning
> call in the busybox inttab file, the line is under the ::sysinit directive.
>
> What are the consequences of this? Respawns are going to work properly?
init.c has a comment explaining it in detail:
/* Each type of actions can appear many times. They will be
* handled in order. RESTART is an exception, only 1st is used.
*/
/* Start these actions first and wait for completion */
#define SYSINIT 0x01
/* Start these after SYSINIT and wait for completion */
#define WAIT 0x02
/* Start these after WAIT and *dont* wait for completion */
#define ONCE 0x04
/*
* NB: while SYSINIT/WAIT/ONCE are being processed,
* SIGHUP ("reread /etc/inittab") will be processed only after
* each group of actions. If new inittab adds, say, a SYSINIT action,
* it will not be run, since init is already "past SYSINIT stage".
*/
/* Start these after ONCE are started, restart on exit */
#define RESPAWN 0x08
/* Like RESPAWN, but wait for <Enter> to be pressed on tty */
#define ASKFIRST 0x10
/*
* Start these on SIGINT, and wait for completion.
* Then go back to respawning RESPAWN and ASKFIRST actions.
* NB: kernel sends SIGINT to us if Ctrl-Alt-Del was pressed.
*/
#define CTRLALTDEL 0x20
/*
* Start these before killing all processes in preparation for
* running RESTART actions or doing low-level halt/reboot/poweroff
* (initiated by SIGUSR1/SIGTERM/SIGUSR2).
* Wait for completion before proceeding.
*/
#define SHUTDOWN 0x40
/*
* exec() on SIGQUIT. SHUTDOWN actions are started and waited for,
* then all processes are killed, then init exec's 1st RESTART action,
* replacing itself by it. If no RESTART action specified,
* SIGQUIT has no effect.
*/
#define RESTART 0x80
In short: no. Until sysinit finishes, RESPAWN actions will not be started.
More information about the busybox
mailing list