1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

s3:smbd/server: pass smbd_parent_context to smbd_setup_sig_chld_handler()

metze
This commit is contained in:
Stefan Metzmacher 2011-12-13 15:21:12 +01:00
parent 6d15ca3482
commit dddaa52552

View File

@ -344,15 +344,15 @@ static void smbd_sig_chld_handler(struct tevent_context *ev,
}
}
static void smbd_setup_sig_chld_handler(struct tevent_context *ev_ctx)
static void smbd_setup_sig_chld_handler(struct smbd_parent_context *parent)
{
struct tevent_signal *se;
se = tevent_add_signal(ev_ctx,
ev_ctx, /* mem_ctx */
se = tevent_add_signal(parent->ev_ctx,
parent, /* mem_ctx */
SIGCHLD, 0,
smbd_sig_chld_handler,
NULL);
parent);
if (!se) {
exit_server("failed to setup SIGCHLD handler");
}
@ -599,7 +599,7 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
#endif
/* Stop zombies */
smbd_setup_sig_chld_handler(ev_ctx);
smbd_setup_sig_chld_handler(parent);
/* use a reasonable default set of ports - listing on 445 and 139 */
if (!smb_ports) {
@ -1311,7 +1311,7 @@ extern void build_options(bool screen);
#endif
/* Stop zombies */
smbd_setup_sig_chld_handler(ev_ctx);
smbd_setup_sig_chld_handler(parent);
smbd_process(ev_ctx, smbd_server_conn);