From 8c8bb51de1ac2baa46ac0736fae12c034288e5d4 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 9 Feb 2010 17:02:20 +0800 Subject: s3: signals are processed twice in child. Signed-off-by: Bo Yang --- lib/tevent/tevent.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/tevent/tevent.c') diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c index 56d0da3927..a0ee208663 100644 --- a/lib/tevent/tevent.c +++ b/lib/tevent/tevent.c @@ -176,6 +176,13 @@ int tevent_common_context_destructor(struct tevent_context *ev) sn = se->next; se->event_ctx = NULL; DLIST_REMOVE(ev->signal_events, se); + /* + * This is important, Otherwise signals + * are handled twice in child. eg, SIGHUP. + * one added in parent, and another one in + * the child. -- BoYang + */ + tevent_cleanup_pending_signal_handlers(se); } return 0; -- cgit