diff options
author | David Oberhollenzer <goliath@infraroot.at> | 2020-03-31 13:09:04 +0200 |
---|---|---|
committer | David Oberhollenzer <goliath@infraroot.at> | 2020-03-31 13:09:04 +0200 |
commit | 9f9807d4d3e0ecabc9bb67658d58644d714a9fd7 (patch) | |
tree | 0261dc3b87584006d98472408e0527c2eeda8c5f /initd/runsvc.c | |
parent | 0d985a7430299aba28e136d9558497ae02c8085e (diff) |
cleanup: initd: simplify and merge linux specific code into main.c
Targetting anything else than Linux isn't really relevant. All
other systems ($BSD and other Unices) are a closed ecosystem
where kernel & userspace are developed together. They don't need
something like a third party init system, so compatibillity can
be largely ignored.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'initd/runsvc.c')
-rw-r--r-- | initd/runsvc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/initd/runsvc.c b/initd/runsvc.c index 338a7de..7c1dc36 100644 --- a/initd/runsvc.c +++ b/initd/runsvc.c @@ -10,6 +10,7 @@ pid_t runsvc(service_t *svc) { char *argv[4], *envp[1]; + sigset_t mask; pid_t pid; argv[0] = (char *)RUNSVCBIN; @@ -25,7 +26,9 @@ pid_t runsvc(service_t *svc) perror("fork"); if (pid == 0) { - sigreset(); + sigemptyset(&mask); + sigprocmask(SIG_SETMASK, &mask, NULL); + execve(argv[0], argv, envp); perror(argv[0]); exit(EXIT_FAILURE); |