inittab: Start shell only if console is not null
Harald Becker
ralda at gmx.de
Thu Aug 28 13:14:07 UTC 2014
Denys !
> I don't like special-casing exit code values.
>
> The "proper" fix is to open the file in the parent, before fork.
> Then the failure can be detected in the parent.
This patch not only disables entries due to open failure of the console,
it also disables endless respawning of processes when the given program
can't be executed, a case which usually return -1 (which results in an
exit code of 255). There is no other special-casing of exit codes than
this one used for decades.
The result shall be:
- If an action entry fails with an exit code of -1, the action entry
gets blocked and not automatically respawned until next SIGHUP.
- If an action process exits with any other legal value or is exited by
a signal the corresponding action is marked "available" and will be
respawned after this one second delay.
This fixes a long standing problem with Busybox init, which will endless
respawn unavailable services give in inittab, and also triggers when the
init action can't be started due to any other error (like console open
failure).
--
Harald
More information about the busybox
mailing list