This makes it easier to understand the process graph as there is
not a duplicate (eg) ldap[master] process for each tfork waiter.
when useing "ps -ef -o pid,comm"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14287
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
#include "lib/util/sys_rw.h"
#include "lib/util/tfork.h"
#include "lib/util/debug.h"
+#include "lib/util/util_process.h"
#ifdef HAVE_PTHREAD
#include <pthread.h>
* The "waiter" child.
*/
setproctitle("tfork waiter process");
+ prctl_set_comment("tfork waiter");
CatchSignal(SIGCHLD, SIG_DFL);
close(status_sp_caller_fd);
return 0;
}
state->worker_pid = pid;
+ setproctitle("tfork waiter process(%d)", pid);
+ prctl_set_comment("tfork(%d)", pid);
close(ready_pipe_worker_fd);