Skip to contentSkip to conversation

Use SIG_ERR to indicate tst_sig's default handler, to allow (and not clash with) SIG_DFL

PATCH Subrata Modak 1 participant 1 message Sep 27, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Jiri Palecek

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.

Quoted 6 lines

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

Thanks.

Regards--
Subrata

Quoted 9 lines
---
 include/test.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/test.h +0 -0
index 864b8de..f737575 100644

include/test.h line 97

Quoted 8 lines
include/test.h +1 -1
@@ -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.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list