mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Add a signal handler for SIGINT to make sure that the PID file
gets cleaned up upon receiving SIGINT. This un-breaks subsequent executions of ipfwpcap and helps when debugging network/divert issues like this: ipfwpcap -r 6000 - | tcpdump -r - MFC after: 1 week
This commit is contained in:
parent
6a53f0a52b
commit
9195f2b323
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172581
@ -106,6 +106,7 @@ int pn;
|
||||
siginterrupt(SIGHUP, 1);
|
||||
signal (SIGTERM, quit);
|
||||
signal (SIGHUP, quit);
|
||||
signal (SIGINT, quit);
|
||||
|
||||
n = write(fd, numbuf, numlen);
|
||||
if (n < 0) { perror(pidfile); quit(23); }
|
||||
|
Loading…
Reference in New Issue
Block a user