mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
lib/tfork: Improve process titles for the tfork waiter process
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>
This commit is contained in:
parent
3136d2fd95
commit
f50bd0d050
@ -26,6 +26,7 @@
|
||||
#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>
|
||||
@ -572,6 +573,7 @@ static pid_t tfork_start_waiter_and_worker(struct tfork_state *state,
|
||||
* The "waiter" child.
|
||||
*/
|
||||
setproctitle("tfork waiter process");
|
||||
prctl_set_comment("tfork waiter");
|
||||
CatchSignal(SIGCHLD, SIG_DFL);
|
||||
|
||||
close(status_sp_caller_fd);
|
||||
@ -603,6 +605,8 @@ static pid_t tfork_start_waiter_and_worker(struct tfork_state *state,
|
||||
return 0;
|
||||
}
|
||||
state->worker_pid = pid;
|
||||
setproctitle("tfork waiter process(%d)", pid);
|
||||
prctl_set_comment("tfork(%d)", pid);
|
||||
|
||||
close(ready_pipe_worker_fd);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user