r13316: Let the carnage begin....
[kai/samba.git] / source3 / lib / messages.c
index 058bbc99b0bcce105609c18af40a633096a95ad0..2d6518aed6a718a429962e487e61702f4a9b2836 100644 (file)
@@ -604,4 +604,19 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type,
                *n_sent = msg_all.n_sent;
        return True;
 }
+
+/*
+ * Block and unblock receiving of messages. Allows removal of race conditions
+ * when doing a fork and changing message disposition.
+ */
+
+void message_block(void)
+{
+       BlockSignals(True, SIGUSR1);
+}
+
+void message_unblock(void)
+{
+       BlockSignals(False, SIGUSR1);
+}
 /** @} **/