summaryrefslogtreecommitdiffstats
path: root/source/lib/messages.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-03 22:19:41 +0000
committerGerald Carter <jerry@samba.org>2006-02-03 22:19:41 +0000
commit5831715049f2d460ce42299963a5defdc160891b (patch)
tree19a0c31c817c9bc26fd53485b5348ab4af127a23 /source/lib/messages.c
parente24ac859e7964714ed3b543300aadf77955af5bf (diff)
downloadsamba-5831715049f2d460ce42299963a5defdc160891b.tar.gz
samba-5831715049f2d460ce42299963a5defdc160891b.tar.xz
samba-5831715049f2d460ce42299963a5defdc160891b.zip
r13316: Let the carnage begin....
Sync with trunk as off r13315
Diffstat (limited to 'source/lib/messages.c')
-rw-r--r--source/lib/messages.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/lib/messages.c b/source/lib/messages.c
index 058bbc99b0b..2d6518aed6a 100644
--- a/source/lib/messages.c
+++ b/source/lib/messages.c
@@ -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);
+}
/** @} **/