---
sinit.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/sinit.c b/sinit.c
index e338f35..93f9925 100644
--- a/sinit.c
+++ b/sinit.c
_AT_@ -74,16 +74,14 @@ sigreboot(void)
static void
spawn(char *const argv[])
{
- pid_t pid;
-
- pid = fork();
- if (pid < 0) {
- perror("fork");
- } else if (pid == 0) {
+ switch (fork()) {
+ case 0:
sigprocmask(SIG_UNBLOCK, &set, NULL);
setsid();
execvp(argv[0], argv);
perror("execvp");
_exit(1);
+ case -1:
+ perror("fork");
}
}
--
2.7.3
--Multipart=_Fri__23_Sep_2016_09_48_08_+0200_LKc5A6gQev8EJzQv--
Received on Mon Sep 17 2001 - 00:00:00 CEST
This archive was generated by hypermail 2.3.0 : Fri Sep 23 2016 - 09:48:17 CEST