diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-01-23 17:52:14 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-01-23 17:52:14 +0000 |
commit | 9a5851d4b30aae599e77ec4538fc8efb635b77cf (patch) | |
tree | a3c6c1fe596f990302114642a9e7b9763886f72b /usr.bin/aucat/aucat.c | |
parent | e7ec44c97784df16ba9b9036f6262aa59a3381ab (diff) |
catch SIGHUP and SIGTERM too, to ensure that recorded files are
properly closed and sockets are cleaned up.
Diffstat (limited to 'usr.bin/aucat/aucat.c')
-rw-r--r-- | usr.bin/aucat/aucat.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) |