aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/inotifyd.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending/inotifyd.c')
-rw-r--r--toys/pending/inotifyd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/toys/pending/inotifyd.c b/toys/pending/inotifyd.c
index 98de2546..657fcb5f 100644
--- a/toys/pending/inotifyd.c
+++ b/toys/pending/inotifyd.c
@@ -55,11 +55,10 @@ static void sig_handler(int sig)
static int exec_wait(char **args)
{
int status = 0;
- pid_t pid = fork();
+ pid_t pid = xfork();
if (!pid) xexec(args);
- else if (pid > 0) waitpid(pid, &status, 0);
- else perror_exit("fork");
+ else waitpid(pid, &status, 0);
return WEXITSTATUS(status);
}