public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: liubo <liubo-fnst@cn.fujitsu.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] ppoll01: Fix to set the signal handler of SIGINT
Date: Mon, 12 Oct 2009 17:39:14 +0800	[thread overview]
Message-ID: <4AD2F942.1090004@cn.fujitsu.com> (raw)

The test case ppoll01 does not register the signal handler
of SIGINT, so the program will be terminated by SIGINT
from child process.

Then, the rest cases will not be tested.

This patch fixed the problem.

Signed-off-by: Liu Bo <liubo-fnst@cn.fujitsu.com>
---
diff --git a/testcases/kernel/syscalls/ppoll/ppoll01.c b/testcases/kernel/syscalls/ppoll/ppoll01.c
index f76d61f..585297c 100644
--- a/testcases/kernel/syscalls/ppoll/ppoll01.c
+++ b/testcases/kernel/syscalls/ppoll/ppoll01.c
@@ -124,9 +124,17 @@ extern void cleanup() {
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
+/*
+ * sighandler()
+ */
+void sighandler(int sig)
+{
+       return;
+}
 void setup() {
         /* Capture signals if any */
-        /* Create temporary directories */
+       signal(SIGINT, sighandler);
+       /* Create temporary directories */
         TEST_PAUSE;
         tst_tmpdir();
 }
@@ -404,16 +412,6 @@ TEST_END:
 }
 
 
-/*
- * sighandler()
- */
-void sighandler(int sig)
-{
-        if (sig == SIGINT)
-                return;
-        // NOTREACHED
-        return;
-}
 
 
 /*

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2009-10-12  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12  9:39 liubo [this message]
2009-10-12 18:28 ` [LTP] [PATCH] ppoll01: Fix to set the signal handler of SIGINT Garrett Cooper
2009-10-12 18:36   ` Mike Frysinger
2009-10-13  9:40     ` liubo

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=4AD2F942.1090004@cn.fujitsu.com \
    --to=liubo-fnst@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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