From 5dcd0f6ff8458786206bace673263bcc04b53edf Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 30 Oct 2005 21:22:05 +0000 Subject: make use of setproctitle() to change the process title of the daemon processes. This is especially useful to distuingish the main daemon and the chroot() helper process. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@908 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/chroot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'avahi-daemon/chroot.c') diff --git a/avahi-daemon/chroot.c b/avahi-daemon/chroot.c index 5504cbd..3cace26 100644 --- a/avahi-daemon/chroot.c +++ b/avahi-daemon/chroot.c @@ -39,6 +39,7 @@ #include "chroot.h" #include "caps.h" +#include "setproctitle.h" enum { AVAHI_CHROOT_SUCCESS = 0, @@ -286,7 +287,7 @@ fail: return ret; } -int avahi_chroot_helper_start(void) { +int avahi_chroot_helper_start(const char *argv0) { int sock[2]; pid_t pid; @@ -306,6 +307,8 @@ int avahi_chroot_helper_start(void) { /* Drop all remaining capabilities */ avahi_caps_drop_all(); + + avahi_set_proc_title("%s: chroot helper process", argv0); close(sock[0]); helper_main(sock[1]); -- cgit