All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] Use SIG_ERR to indicate tst_sig's default handler, to allow (and not clash with) SIG_DFL
@ 2009-09-23 12:38 Jiri Palecek
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Palecek @ 2009-09-23 12:38 UTC (permalink / raw
  Cc: ltp-list

Hello,

 SIG_DFL happens to be 0 as well as DEF_HANDLER - this means you
 cannot use SIG_DFL as tst_sig argument, eg. if you want to reset the
 signal handling in tests' children to normal.

 This patch changes DEF_HANDLER to be SIG_ERR, as this value cannot be normally used with tst_sig(), so they cannot clash.

Regards
    Jiri Palecek

Signed-off-by: Jiri Palecek <jpalecek@web.de>
---
 include/test.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/test.h b/include/test.h
index 864b8de..f737575 100644
--- a/include/test.h
+++ b/include/test.h
@@ -91,7 +91,7 @@
 /* defines for unexpected signal setup routine (set_usig.c) */
 #define FORK    1		/* SIGCLD is to be ignored */
 #define NOFORK  0		/* SIGCLD is to be caught */
-#define DEF_HANDLER 0	/* tells set_usig() to use default signal handler */
+#define DEF_HANDLER SIG_ERR	/* tells set_usig() to use default signal handler */
 
 /*
  * The following defines are used to control tst_res and t_result reporting.
-- 
1.6.4.3




------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread
[parent not found: <200909241313.n8ODDB8b020776@e4.ny.us.ibm.com>]

end of thread, other threads:[~2009-09-27 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-23 12:38 [LTP] [PATCH] Use SIG_ERR to indicate tst_sig's default handler, to allow (and not clash with) SIG_DFL Jiri Palecek
     [not found] <200909241313.n8ODDB8b020776@e4.ny.us.ibm.com>
2009-09-27 18:15 ` Subrata Modak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.