sscall

UDP based voice chat
git clone git://git.2f30.org/sscall
Log | Files | Refs | README | LICENSE

commit 369054a0abbc6dfd6baad2d46d237ba419b98904
parent 6d9a2e0cd48f9196fd3aec6ead43464bdfd48a76
Author: sin <sin@2f30.org>
Date:   Mon,  4 Jun 2012 17:00:49 +0100

sscall: Delay the registration of the SIGINT handler


Diffstat:
Msscall.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sscall.c b/sscall.c @@ -236,9 +236,6 @@ main(int argc, char *argv[]) int c; char host[NI_MAXHOST]; - if (signal(SIGINT, sig_handler) == SIG_ERR) - err(1, "signal"); - prog = *argv; while ((c = getopt(argc, argv, "hb:c:r:d:v")) != -1) { switch (c) { @@ -381,6 +378,9 @@ main(int argc, char *argv[]) if (ret < 0) errx(1, "pthread_create failed: %d", ret); + if (signal(SIGINT, sig_handler) == SIG_ERR) + err(1, "signal"); + /* Receive audio data from other end and prepare * for playback */ do {