summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/chroot.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-30 21:22:05 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-30 21:22:05 +0000
commit5dcd0f6ff8458786206bace673263bcc04b53edf (patch)
tree3c24a43636ec7ce17a4d61fa1718ea5249ab947a /avahi-daemon/chroot.c
parentaedd4e87362371d83dd64d0bfb03ea3e5526607f (diff)
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
Diffstat (limited to 'avahi-daemon/chroot.c')
-rw-r--r--avahi-daemon/chroot.c5
1 files changed, 4 insertions, 1 deletions
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]);