diff options
author | 2009-01-23 17:52:13 +0000 | |
---|---|---|
committer | 2009-01-23 17:52:13 +0000 | |
commit | 3d1bbf4529dd2b6083d4dbfb0b7556f10271a987 (patch) | |
tree | e75c2a5e3c49e07f2f4d7dcf6f62aed725b4ed48 | |
parent | spacing + typo fix from Matt Jibson <matt.jibson(at)gmail.com> (diff) | |
download | wireguard-openbsd-3d1bbf4529dd2b6083d4dbfb0b7556f10271a987.tar.xz wireguard-openbsd-3d1bbf4529dd2b6083d4dbfb0b7556f10271a987.zip |
catch SIGHUP and SIGTERM too, to ensure that recorded files are
properly closed and sockets are cleaned up.
-rw-r--r-- | usr.bin/aucat/aucat.1 | 9 | ||||
-rw-r--r-- | usr.bin/aucat/aucat.c | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/aucat/aucat.1 b/usr.bin/aucat/aucat.1 index 9f9462ac56e..490d8640f6f 100644 --- a/usr.bin/aucat/aucat.1 +++ b/usr.bin/aucat/aucat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: aucat.1,v 1.43 2009/01/10 22:13:07 jmc Exp $ +.\" $OpenBSD: aucat.1,v 1.44 2009/01/23 17:52:13 ratchov Exp $ .\" .\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 10 2009 $ +.Dd $Mdocdate: January 23 2009 $ .Dt AUCAT 1 .Os .Sh NAME @@ -163,7 +163,10 @@ then the stream is closed permanently. If .Nm is sent -.Dv SIGINT , +.Dv SIGHUP , +.Dv SIGINT +or +.Dv SIGTERM , it terminates recording to files. If sent .Dv SIGUSR1 diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index 7354603ea72..8de52227369 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.52 2009/01/23 17:38:15 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.53 2009/01/23 17:52:13 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -491,6 +491,10 @@ main(int argc, char **argv) sa.sa_handler = sigint; if (sigaction(SIGINT, &sa, NULL) < 0) DPRINTF("sigaction(int) failed\n"); + if (sigaction(SIGTERM, &sa, NULL) < 0) + DPRINTF("sigaction(term) failed\n"); + if (sigaction(SIGHUP, &sa, NULL) < 0) + DPRINTF("sigaction(hup) failed\n"); #ifdef DEBUG sa.sa_handler = sigusr1; if (sigaction(SIGUSR1, &sa, NULL) < 0) |