summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c8
-rw-r--r--source3/smbd/proto.h2
-rw-r--r--source3/smbd/server.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index dffb855f0b..a2cccaad43 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -878,15 +878,15 @@ static void smbd_sig_term_handler(struct tevent_context *ev,
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");
}
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index d7a7c4e4b5..bf759f5304 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -755,7 +755,7 @@ NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx,
/* 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,
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index bef1a13859..f7edc9996e 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -460,7 +460,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
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);