diff -u ./lib/replace/system/wait.h.orig ./lib/replace/system/wait.h --- ./lib/replace/system/wait.h.orig 2010-05-17 06:51:23.000000000 -0500 +++ ./lib/replace/system/wait.h 2010-09-25 09:41:24.000000000 -0500 @@ -45,8 +45,10 @@ #endif #ifndef SA_RESETHAND +#ifdef SA_ONESHOT #define SA_RESETHAND SA_ONESHOT #endif +#endif #if !defined(HAVE_SIG_ATOMIC_T_TYPE) typedef int sig_atomic_t; diff -u ./lib/tevent/tevent_signal.c.orig ./lib/tevent/tevent_signal.c --- ./lib/tevent/tevent_signal.c.orig 2010-05-17 06:51:23.000000000 -0500 +++ ./lib/tevent/tevent_signal.c 2010-09-25 09:39:25.000000000 -0500 @@ -353,16 +355,20 @@ (void*)&sig_state->sig_info[i][ofs], se->private_data); } +# ifdef SA_RESETHAND if (se->sa_flags & SA_RESETHAND) { talloc_free(se); } +# endif continue; } #endif se->handler(ev, se, i, count, NULL, se->private_data); +#ifdef SA_RESETHAND if (se->sa_flags & SA_RESETHAND) { talloc_free(se); } +#endif } #ifdef SA_SIGINFO