s3: signals are processed twice in child.
[ira/wip.git] / lib / tevent / tevent.c
index 56d0da39276ee3489b59b8d81ab495d601266903..a0ee208663880d0429de3744a2b8c951e6ed183f 100644 (file)
@@ -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;