diff options
Diffstat (limited to 'lib/tevent')
-rw-r--r-- | lib/tevent/testsuite.c | 2 | ||||
-rw-r--r-- | lib/tevent/tevent_signal.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c index 991e161733..1e2f25afb0 100644 --- a/lib/tevent/testsuite.c +++ b/lib/tevent/testsuite.c @@ -101,7 +101,9 @@ static bool test_event_context(struct torture_context *test, #ifdef SA_RESTART se1 = event_add_signal(ev_ctx, ev_ctx, SIGALRM, SA_RESTART, count_handler, &alarm_count); #endif +#ifdef SA_RESETHAND se2 = event_add_signal(ev_ctx, ev_ctx, SIGALRM, SA_RESETHAND, count_handler, &alarm_count); +#endif #ifdef SA_SIGINFO se3 = event_add_signal(ev_ctx, ev_ctx, SIGUSR1, SA_SIGINFO, count_handler, &info_count); #endif diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c index dbab8a8ada..b7908593f0 100644 --- a/lib/tevent/tevent_signal.c +++ b/lib/tevent/tevent_signal.c @@ -355,16 +355,20 @@ int tevent_common_check_signal(struct tevent_context *ev) (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 |