]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:prefork: mention service name in exit messages
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 23 May 2025 03:55:57 +0000 (15:55 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 5 Jun 2025 23:06:37 +0000 (23:06 +0000)
REF: https://lists.samba.org/archive/samba/2025-February/250946.html

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
source4/samba/process_prefork.c

index 92e145d4c677e123cb5092829dc4dc5adf1faf0f..24d2de658422b096b0075d52d2a2227105c1d985 100644 (file)
@@ -621,21 +621,21 @@ static void prefork_child_pipe_handler(struct tevent_context *ev,
        irpc_cleanup(rc->lp_ctx, ev, pid);
        status = tfork_status(&rc->t, false);
        if (status == -1) {
-               DBG_ERR("Parent %d, Child %d terminated, "
+               DBG_ERR("%s: Parent %d, Child %d terminated, "
                        "unable to get status code from tfork\n",
-                       getpid(), pid);
+                       rc->service_name, getpid(), pid);
                rc_inuse = prefork_restart(ev, rc);
        } else if (WIFEXITED(status)) {
                status = WEXITSTATUS(status);
-               DBG_ERR("Parent %d, Child %d exited with status %d\n",
-                        getpid(), pid,  status);
+               DBG_ERR("%s: Parent %d, Child %d exited with status %d\n",
+                       rc->service_name, getpid(), pid,  status);
                if (status != 0) {
                        rc_inuse = prefork_restart(ev, rc);
                }
        } else if (WIFSIGNALED(status)) {
                status = WTERMSIG(status);
-               DBG_ERR("Parent %d, Child %d terminated with signal %d\n",
-                       getpid(), pid, status);
+               DBG_ERR("%s: Parent %d, Child %d terminated with signal %d\n",
+                       rc->service_name, getpid(), pid, status);
                if (status == SIGABRT || status == SIGBUS || status == SIGFPE ||
                    status == SIGILL || status == SIGSYS || status == SIGSEGV ||
                    status == SIGKILL) {