Skip to contentSkip to conversation

dvbv5-zap.c: fix setting signal handlers

PATCH Superseded Jemma Denson 1 participant 1 message Dec 18, 2015 Media (V4L/DVB)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dvbv5-zap.c: fix setting signal handlers

Signal handlers are currently out of order - SIGALRM is always set, and SIGINT only set when timeout is set. These should be the other way round.

---
 utils/dvb/dvbv5-zap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
utils/dvb/dvbv5-zap.c +2 -2
index e19d7c2..e927383 100644
@@ -959,10 +959,10 @@ int main(int argc, char **argv)
 			goto err;
 	}
 
-	signal(SIGALRM, do_timeout);
 	signal(SIGTERM, do_timeout);
+	signal(SIGINT, do_timeout);
 	if (args.timeout > 0) {
-		signal(SIGINT, do_timeout);
+		signal(SIGALRM, do_timeout);
 		alarm(args.timeout);
 	}
 
Signature · 1 line
2.1.0