 -                    child, forkCount, status);
 -          }
 -        }
-+    if (childPid) {
-+      rc = 0;
-+    }
-+    else {
-+      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;
-+        /* default is to use the watch dog! */
-+        if ([ud objectForKey:@"WOUseWatchDog"] != nil
-+            && ![ud boolForKey:@"WOUseWatchDog"])
-+          rc = WOApplicationMain(appName, argc, argv);
-+        else
-+          rc = [[WOWatchDog sharedWatchDog] run: appName argc: argc argv: argv];
-       }
-+      else {
 +        [ud errorWithFormat: @"unable to open pid file: %@", pidFile];
 +        rc = -1;
-+      }
+       }
      }
 -    return 0;
    }

-                    child, forkCount, strerror(errno));
-            continue;
-          }
+    if ([ud boolForKey: @"WONoDetach"])
+      childPid = 0;
+    else
+      childPid = fork();
 
-          clientStopTime = time(NULL);
-          uptime = clientStopTime - clientStartTime;
-          

 }
 #endif
 
@@ -421,8 +1041,8 @@
 
 @interface NSUserDefaults(ServerDefaults)
 + (id)hackInServerDefaults:(NSUserDefaults *)_ud
