From 8c5266c711742fbf9fea1cf6491959aff3d367fb Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 6 Jan 2022 19:55:17 +0100 Subject: explain timedwait --- rvnit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rvnit.c') diff --git a/rvnit.c b/rvnit.c index 6cdf946..6e8f99a 100644 --- a/rvnit.c +++ b/rvnit.c @@ -401,6 +401,8 @@ timedwait(int *wstatus, int secs) sigemptyset(&childset); sigaddset(&childset, SIGCHLD); + /* we block SIGCHLD here, so that we do not lose the signal + possibly sent between waitpid(-1) and sigtimedwait */ sigprocmask(SIG_BLOCK, &childset, 0); pid_t pid; -- cgit 1.4.1