public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] Fix to set the signal handler of SIGINT in mq_timedreceive01
@ 2009-07-21  2:28 Wei Yongjun
  2009-07-21 13:07 ` Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Yongjun @ 2009-07-21  2:28 UTC (permalink / raw)
  To: ltp-list

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

This patch fixed the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>

diff --git a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
index dadc38d..beeb298 100644
--- a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
+++ b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
@@ -106,6 +106,14 @@ extern void cleanup() {
         tst_exit();
 }
 
+/*
+ * sighandler()
+ */
+void sighandler(int sig)
+{
+        return;
+}
+
 /* Local  Functions */
 /******************************************************************************/
 /*                                                                            */
@@ -126,6 +134,7 @@ extern void cleanup() {
 /******************************************************************************/
 void setup() {
         /* Capture signals if any */
+        signal(SIGINT, sighandler);
         /* Create temporary directories */
         TEST_PAUSE;
         tst_tmpdir();
@@ -432,17 +441,6 @@ EXIT:
         return result;
 }
 
-/*
- * sighandler()
- */
-void sighandler(int sig)
-{
-        if (sig == SIGINT)
-                return;
-        // NOTREACHED
-        return;
-}
-
 
 
 /*





------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-30 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21  2:28 [LTP] [PATCH] Fix to set the signal handler of SIGINT in mq_timedreceive01 Wei Yongjun
2009-07-21 13:07 ` Michal Simek
2009-07-22  5:47   ` Wei Yongjun
2009-07-30 18:29     ` Subrata Modak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox