From: Lennart Poettering Date: Thu, 31 Aug 2006 20:16:54 +0000 (+0000) Subject: change process title to work with pidof/killall X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=287f9866c923e6afe8ffbbc03b90be64acf395e1;p=catta change process title to work with pidof/killall git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1304 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-autoipd/main.c b/avahi-autoipd/main.c index 82dba88..ceec9b5 100644 --- a/avahi-autoipd/main.c +++ b/avahi-autoipd/main.c @@ -280,13 +280,13 @@ static void set_state(State st, int reset_counter, uint32_t address) { if (modify_proc_title) { if (state == STATE_SLEEPING) - avahi_set_proc_title(argv0, "%s(%s): sleeping", argv0, interface_name); + avahi_set_proc_title(argv0, "%s: [%s] sleeping", argv0, interface_name); else if (state == STATE_ANNOUNCING) - avahi_set_proc_title(argv0, "%s(%s): announcing %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf))); + avahi_set_proc_title(argv0, "%s: [%s] announcing %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf))); else if (state == STATE_RUNNING) - avahi_set_proc_title(argv0, "%s(%s): bound %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf))); + avahi_set_proc_title(argv0, "%s: [%s] bound %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf))); else - avahi_set_proc_title(argv0, "%s(%s): probing %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf))); + avahi_set_proc_title(argv0, "%s: [%s] probing %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf))); } } @@ -478,7 +478,7 @@ static FILE* fork_dispatcher(void) { setsid(); - avahi_set_proc_title(argv0, "%s(%s): callout dispatcher", argv0, interface_name); + avahi_set_proc_title(argv0, "%s: [%s] callout dispatcher", argv0, interface_name); close(fds[1]); @@ -1128,7 +1128,7 @@ int main(int argc, char*argv[]) { } else wrote_pid_file = 1; - avahi_set_proc_title(argv0, "%s(%s): starting up", argv0, interface_name); + avahi_set_proc_title(argv0, "%s: [%s] starting up", argv0, interface_name); if (loop(ifindex, start_address) < 0) goto finish;