 +      rc = 0;
 +    }
 +    else {
-+      pidFile = [ud objectForKey: @"WOPidFile"];
-+      if (!pidFile)
-+        pidFile = [NSString stringWithFormat: @"/var/run/%@/%@.pid",
-+                            [processInfo processName],
-+                            [processInfo processName]];
-+      if (_writePid(pidFile)) {
++      nsPidFile = [ud objectForKey: @"WOPidFile"];
++      if (!nsPidFile)
++        nsPidFile = [NSString stringWithFormat: @"/var/run/%@/%@.pid",
++                              [processInfo processName],
++                              [processInfo processName]];
++      pidFile = [nsPidFile UTF8String];
++      if (_writePid(nsPidFile)) {
 +        respawnDelay = [ud integerForKey: @"WORespawnDelay"];
 +        if (!respawnDelay)
 +          respawnDelay = 5;

+}
+
+- (void) _handleTermination:(NSNumber *)_signal {
+  if (!terminationSignal)
+    ASSIGN (terminationSignal, _signal);
+}
+
+- (void) _handleSIGHUP:(NSNumber *)_signal {

 #if LIB_FOUNDATION_LIBRARY || defined(GS_PASS_ARGUMENTS)
   {
     extern char **environ;
@@ -241,179 +961,68 @@
                    environment:(void*)environ];
   }
 #endif
