diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-03 22:19:41 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-02-03 22:19:41 +0000 |
commit | 5831715049f2d460ce42299963a5defdc160891b (patch) | |
tree | 19a0c31c817c9bc26fd53485b5348ab4af127a23 /source/lib/messages.c | |
parent | e24ac859e7964714ed3b543300aadf77955af5bf (diff) | |
download | samba-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.c | 15 |
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); +} /** @} **/ |