diff options
author | Andreas Schneider <asn@samba.org> | 2013-02-25 10:41:18 +0100 |
---|---|---|
committer | David Disseldorp <ddiss@suse.de> | 2013-03-05 23:29:48 +0100 |
commit | f06a0352e551ea125675659923c909d6d4c473fd (patch) | |
tree | ac620a1f2b68aa0a960e5c10013ff687ee01c47b /source3/rpc_server | |
parent | f9fb3faaef4c15b7c4c3748b0e93fa3061b573c3 (diff) | |
download | samba-f06a0352e551ea125675659923c909d6d4c473fd.tar.gz samba-f06a0352e551ea125675659923c909d6d4c473fd.tar.bz2 samba-f06a0352e551ea125675659923c909d6d4c473fd.zip |
s3-daemons: Set the comment field of the daemons.
PR_SET_NAME sets the comm field of a process. This way we can give
processes a name and they are easier to identify.
$ ps afx -o pid,comm
29447 smbd
29452 \_ epmd
29453 \_ lsasd-master
29455 | \_ lsasd-child
29457 | \_ lsasd-child
29459 | \_ lsasd-child
29461 | \_ lsasd-child
29463 | \_ lsasd-child
29454 \_ spoolssd-master
29456 \_ lpqd
29458 \_ spoolssd-child
29460 \_ spoolssd-child
29462 \_ spoolssd-child
29465 \_ spoolssd-child
29466 \_ spoolssd-child
29467 \_ spoolssd-child
29468 \_ spoolssd-child
29469 \_ spoolssd-child
29470 \_ spoolssd-child
29471 \_ spoolssd-child
Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/epmd.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/lsasd.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/rpc_server/epmd.c b/source3/rpc_server/epmd.c index 0e7b430213..8d77c4afca 100644 --- a/source3/rpc_server/epmd.c +++ b/source3/rpc_server/epmd.c @@ -25,6 +25,8 @@ #include "ntdomain.h" #include "messages.h" +#include "lib/util/util_process.h" + #include "librpc/rpc/dcerpc_ep.h" #include "../librpc/gen_ndr/srv_epmapper.h" #include "rpc_server/rpc_server.h" @@ -168,6 +170,8 @@ void start_epmd(struct tevent_context *ev_ctx, smb_panic("reinit_after_fork() failed"); } + prctl_set_comment("epmd"); + epmd_reopen_logs(); epmd_setup_sig_term_handler(ev_ctx); diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c index 72ad785cd5..9815ad9c1a 100644 --- a/source3/rpc_server/lsasd.c +++ b/source3/rpc_server/lsasd.c @@ -24,6 +24,8 @@ #include "messages.h" #include "ntdomain.h" +#include "lib/util/util_process.h" + #include "lib/id_cache.h" #include "../lib/tsocket/tsocket.h" @@ -253,6 +255,8 @@ static bool lsasd_child_init(struct tevent_context *ev_ctx, smb_panic("reinit_after_fork() failed"); } + prctl_set_comment("lsasd-child"); + lsasd_child_id = child_id; lsasd_reopen_logs(child_id); @@ -894,6 +898,8 @@ void start_lsasd(struct tevent_context *ev_ctx, smb_panic("reinit_after_fork() failed"); } + prctl_set_comment("lsasd-master"); + /* save the parent process id so the children can use it later */ parent_id = messaging_server_id(msg_ctx); |