Only send USR1 signal when daemonized.
authorScott Cantor <cantor.2@osu.edu>
Wed, 3 Jun 2009 18:43:31 +0000 (18:43 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 3 Jun 2009 18:43:31 +0000 (18:43 +0000)
shibd/shibd.cpp

index 122dc54..5def132 100644 (file)
@@ -384,8 +384,10 @@ int main(int argc, char *argv[])
         }\r
 \r
         // Signal our parent.\r
-        pid_t ppid = getppid();\r
-        kill(ppid, SIGUSR1);\r
+        if (daemonize) {\r
+            pid_t ppid = getppid();\r
+            kill(ppid, SIGUSR1);\r
+        }\r
 \r
         // Run the listener.\r
         if (!listener->run(&shibd_shutdown)) {\r