aboutsummaryrefslogtreecommitdiff
path: root/toys/other/timeout.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-10 11:07:28 -0500
committerRob Landley <rob@landley.net>2015-03-10 11:07:28 -0500
commitc776bde13bb2767db2943bc3b02df737a465c035 (patch)
tree7d8c2283641fa39248a59ecc17897ca2bd547e33 /toys/other/timeout.c
parent8a3c0edadbf915b9d2f318412587f6107a8e6d42 (diff)
downloadtoybox-c776bde13bb2767db2943bc3b02df737a465c035.tar.gz
Use xsignal() instead of signal().
Diffstat (limited to 'toys/other/timeout.c')
-rw-r--r--toys/other/timeout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/timeout.c b/toys/other/timeout.c
index 6da2d2e2..06b1e89a 100644
--- a/toys/other/timeout.c
+++ b/toys/other/timeout.c
@@ -45,7 +45,7 @@ static void handler(int i)
if (TT.k_timeout) {
TT.k_timeout = 0;
TT.nextsig = SIGKILL;
- signal(SIGALRM, handler);
+ xsignal(SIGALRM, handler);
TT.itv.it_value = TT.ktv;
setitimer(ITIMER_REAL, &TT.itv, (void *)toybuf);
}
@@ -66,7 +66,7 @@ void timeout_main(void)
else {
int status;
- signal(SIGALRM, handler);
+ xsignal(SIGALRM, handler);
setitimer(ITIMER_REAL, &TT.itv, (void *)toybuf);
while (-1 == waitpid(TT.pid, &status, 0) && errno == EINTR);
toys.exitval = WIFEXITED(status)