1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

notifyd: Move BlockSignals calls to server.c

notifyd_send() is called as part of smbd initialization both in normal daemon
mode after a fork, but also in interactive mode. In interactive mode, notifyd
should not modify the global signal state with BlockSignals(). This patch moves
the signal blocking to the place where we know that notifyd is a child daemon.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 20 09:04:00 CEST 2016 on sn-devel-144
This commit is contained in:
Volker Lendecke 2016-07-19 14:36:07 +02:00 committed by Jeremy Allison
parent fa96452f9c
commit 698f651786
2 changed files with 4 additions and 4 deletions

View File

@ -258,10 +258,6 @@ struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
return tevent_req_post(req, ev);
}
/* Block those signals that we are not handling */
BlockSignals(True, SIGHUP);
BlockSignals(True, SIGUSR1);
if (ctdbd_conn == NULL) {
/*
* No cluster around, skip the database replication

View File

@ -416,6 +416,10 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive,
}
tevent_req_set_callback(req, notifyd_stopped, msg);
/* Block those signals that we are not handling */
BlockSignals(True, SIGHUP);
BlockSignals(True, SIGUSR1);
messaging_send(msg, pid_to_procid(getppid()), MSG_SMB_NOTIFY_STARTED,
NULL);