]> git.meshlink.io Git - catta/commitdiff
change process title to work with pidof/killall
authorLennart Poettering <lennart@poettering.net>
Thu, 31 Aug 2006 20:16:54 +0000 (20:16 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 31 Aug 2006 20:16:54 +0000 (20:16 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1304 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-autoipd/main.c

index 82dba887a1bfda38ac88f8a9d7387f244703ee78..ceec9b59dbadec3af1bf9b95b1ad65bf4fdd26ad 100644 (file)
@@ -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;