mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdbd: Log PID file creation and removal at NOTICE level
Unexpected removal of this file can have serious consequences, so it is best if this is logged at the default level. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bfed6a8d1771db3401d12b819204736c33acb312)
This commit is contained in:
parent
823edbf6fe
commit
3471807875
@ -1109,8 +1109,8 @@ static void ctdb_remove_pidfile(void)
|
||||
{
|
||||
if (ctdbd_pidfile != NULL && !ctdb_is_child_process()) {
|
||||
if (unlink(ctdbd_pidfile) == 0) {
|
||||
DEBUG(DEBUG_INFO, ("Removed PID file %s\n",
|
||||
ctdbd_pidfile));
|
||||
DEBUG(DEBUG_NOTICE, ("Removed PID file %s\n",
|
||||
ctdbd_pidfile));
|
||||
} else {
|
||||
DEBUG(DEBUG_WARNING, ("Failed to Remove PID file %s\n",
|
||||
ctdbd_pidfile));
|
||||
@ -1132,7 +1132,7 @@ static void ctdb_create_pidfile(pid_t pid)
|
||||
|
||||
fprintf(fp, "%d\n", pid);
|
||||
fclose(fp);
|
||||
DEBUG(DEBUG_INFO, ("Created PID file %s\n", ctdbd_pidfile));
|
||||
DEBUG(DEBUG_NOTICE, ("Created PID file %s\n", ctdbd_pidfile));
|
||||
atexit(ctdb_remove_pidfile);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user