aboutsummaryrefslogtreecommitdiff
path: root/src/com_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/com_start.c')
-rw-r--r--src/com_start.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com_start.c b/src/com_start.c
index 5744e39..3a9dffc 100644
--- a/src/com_start.c
+++ b/src/com_start.c
@@ -45,5 +45,9 @@ timedwaitpid(pid_t pid, int *status)
int rc = -1;
- SIGHANDLER oldsig;
+ struct sigaction act, oldact;
+
+ act.sa_handler = sigchld;
+ act.sa_flags = 0;
+ sigemptyset(&act.sa_mask);
+ sigaction(SIGCHLD, &act, &oldact);
- oldsig = signal(SIGCHLD, sigchld);
gettimeofday(&stoptime, NULL);
@@ -75,3 +79,3 @@ timedwaitpid(pid_t pid, int *status)
}
- signal(SIGCHLD, oldsig);
+ sigaction(SIGCHLD, &oldact, NULL);
if (rc) {

Return to:

Send suggestions and report system problems to the System administrator.