On Wed, 2009-09-23 at 14:38 +0200, Jiri Palecek wrote:
> 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.
> Jiri Palecek
> Signed-off-by: Jiri Palecek <jpalecek@...>
> 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.