exit_server_cleanly("termination signal");
}
-void smbd_setup_sig_term_handler(void)
+void smbd_setup_sig_term_handler(struct smbd_server_connection *sconn)
{
struct tevent_signal *se;
- se = tevent_add_signal(server_event_context(),
- server_event_context(),
+ se = tevent_add_signal(sconn->ev_ctx,
+ sconn,
SIGTERM, 0,
smbd_sig_term_handler,
- NULL);
+ sconn);
if (!se) {
exit_server("failed to setup SIGTERM handler");
}
/* The following definitions come from smbd/process.c */
-void smbd_setup_sig_term_handler(void);
+void smbd_setup_sig_term_handler(struct smbd_server_connection *sconn);
void smbd_setup_sig_hup_handler(struct tevent_context *ev,
struct messaging_context *msg_ctx);
bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer,
smb_panic("reinit_after_fork() failed");
}
- smbd_setup_sig_term_handler();
+ smbd_setup_sig_term_handler(sconn);
smbd_setup_sig_hup_handler(ev,
msg_ctx);