smbd_reinit_after_fork is a simple wrapper around reinit_after_fork that
should be used after forking from the main smbd.
At the moment the only additional step it performs is resetting
am_parent to NULL.
A subsequent commit will make use of this function.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
struct tevent_context *ev_ctx,
bool parent_longlived);
+NTSTATUS smbd_reinit_after_fork(struct messaging_context *msg_ctx,
+ struct tevent_context *ev_ctx,
+ bool parent_longlived);
void *malloc_(size_t size);
void *Realloc(void *p, size_t size, bool free_old_on_error);
void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
{
exit_server_common(SERVER_EXIT_NORMAL, explanation);
}
+
+/*
+ * reinit_after_fork() wrapper that should be called when forking from
+ * smbd.
+ */
+NTSTATUS smbd_reinit_after_fork(struct messaging_context *msg_ctx,
+ struct tevent_context *ev_ctx,
+ bool parent_longlived)
+{
+ am_parent = NULL;
+ return reinit_after_fork(msg_ctx, ev_ctx, parent_longlived);
+}