diff options
author | Rob Landley <rob@landley.net> | 2015-03-10 11:07:28 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-03-10 11:07:28 -0500 |
commit | c776bde13bb2767db2943bc3b02df737a465c035 (patch) | |
tree | 7d8c2283641fa39248a59ecc17897ca2bd547e33 /toys/other/netcat.c | |
parent | 8a3c0edadbf915b9d2f318412587f6107a8e6d42 (diff) | |
download | toybox-c776bde13bb2767db2943bc3b02df737a465c035.tar.gz |
Use xsignal() instead of signal().
Diffstat (limited to 'toys/other/netcat.c')
-rw-r--r-- | toys/other/netcat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/other/netcat.c b/toys/other/netcat.c index d27aa885..453a7ca0 100644 --- a/toys/other/netcat.c +++ b/toys/other/netcat.c @@ -54,12 +54,13 @@ GLOBALS( static void timeout(int signum) { if (TT.wait) error_exit("Timeout"); + // This should be xexit() but would need siglongjmp()... exit(0); } static void set_alarm(int seconds) { - signal(SIGALRM, seconds ? timeout : SIG_DFL); + xsignal(SIGALRM, seconds ? timeout : SIG_DFL); alarm(seconds); } |