1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-24 20:10:42 +01:00
init/cmd/runsvc
David Oberhollenzer 390175c406 cleanup runsvc: merge codepaths for execution, remove cleanup code
Simply execute the last entry in the list directly instead of forking and
remove the cleanup code.

If the list is empty, we return success.

If the list only has one entry, we directly execute that. No need to make a
distinction between single entry vs list anymore.

If the list is an actual list, we run it as before but execute the last one
directly. Typically, the last one is something like a daemon preceeded by
setup code. The daemon ends up directly underneath init, without a dummy
waiting runsvc stuck in the process list.

If we always do an exec, there is no point in doing cleanup. All our mapped
memory is evicted anyway. Same if we exit appruptly because of an error.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-20 15:09:35 +01:00
..
env.c Relicense what is left of the init system under OpenBSD style ISC license 2018-11-23 13:16:08 +01:00
runsvc.c cleanup runsvc: merge codepaths for execution, remove cleanup code 2019-03-20 15:09:35 +01:00
runsvc.h Relicense what is left of the init system under OpenBSD style ISC license 2018-11-23 13:16:08 +01:00