summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-04-02 16:45:25 -0700
committerJeremy Allison <jra@samba.org>2014-04-03 06:22:13 +0200
commit837671f47670b16726aa96ba7a0902974a1037eb (patch)
treeed199a59526ad0b1b55e0e937a502fd73fe3c10a /source3/smbd
parent5cf6e9c8520be49aa57436bf725521cdc5d160f8 (diff)
downloadsamba-837671f47670b16726aa96ba7a0902974a1037eb.tar.gz
samba-837671f47670b16726aa96ba7a0902974a1037eb.tar.xz
samba-837671f47670b16726aa96ba7a0902974a1037eb.zip
s3: messages: Implement cleanup of dead records.
When a smbd process dies, pending messages.tdb records for this process might not get cleaned up. Implement a cleanup for dead records that is triggered after a smbd dies uncleanly; the records for that PID are deleted. Based on a patchset from Christof Schmitt <cs@samba.org>. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 29e688d3f01..bc9d293b494 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -481,6 +481,13 @@ static void remove_child_pid(struct smbd_parent_context *parent,
parent);
DEBUG(1,("Scheduled cleanup of brl and lock database after unclean shutdown\n"));
}
+
+ /*
+ * Ensure we flush any stored messages
+ * queued for the child process that
+ * terminated uncleanly.
+ */
+ messaging_cleanup_server(parent->msg_ctx, child_id);
}
if (!serverid_deregister(child_id)) {