linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v4l-utils PATCH 1/1] dvbv5-zap.c: fix setting signal handlers
@ 2015-12-18 10:35 Jemma Denson
  0 siblings, 0 replies; only message in thread
From: Jemma Denson @ 2015-12-18 10:35 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media

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.

Signed-off-by: Jemma Denson <jdenson@gmail.com>
---
 utils/dvb/dvbv5-zap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c
index e19d7c2..e927383 100644
--- a/utils/dvb/dvbv5-zap.c
+++ b/utils/dvb/dvbv5-zap.c
@@ -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);
 	}
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-18 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-18 10:35 [v4l-utils PATCH 1/1] dvbv5-zap.c: fix setting signal handlers Jemma Denson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).