From: Jemma Denson <jdenson@gmail.com>
To: mchehab@osg.samsung.com
Cc: linux-media@vger.kernel.org
Subject: [v4l-utils PATCH-v2 1/4] dvbv5-zap.c: fix setting signal handlers
Date: Fri, 18 Dec 2015 14:28:23 +0000 [thread overview]
Message-ID: <1450448906-17000-2-git-send-email-jdenson@gmail.com> (raw)
In-Reply-To: <1450448906-17000-1-git-send-email-jdenson@gmail.com>
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
next prev parent reply other threads:[~2015-12-18 14:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 14:28 Patches to dvbv5-zap Jemma Denson
2015-12-18 14:28 ` Jemma Denson [this message]
2015-12-18 14:28 ` [v4l-utils PATCH-v2 2/4] dvbv5-zap.c: allow timeout with -x Jemma Denson
2015-12-18 14:28 ` [v4l-utils PATCH-v2 3/4] dvbv5-zap.c: fix wrong signal Jemma Denson
2015-12-18 14:28 ` [v4l-utils PATCH-v2 4/4] dvbv5-zap.c: Move common signals code into function Jemma Denson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450448906-17000-2-git-send-email-jdenson@gmail.com \
--to=jdenson@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).