  @end
  
  int WOWatchDogApplicationMainWithServerDefaults
-@@ -437,7 +1046,7 @@
+@@ -437,7 +1057,7 @@
    {
      extern char **environ;
      [NSProcessInfo initializeWithArguments:(void*)argv count:argc

+- (NGInternetSocketAddress *) _listeningAddress
+{
+  NGInternetSocketAddress *listeningAddress;
+  id port, allow;
+
+  listeningAddress = nil;
+
+  port = [NSClassFromString (appName) port];
+  if (!port)
+    port = @"auto";
+  allow
+    = [[NSUserDefaults standardUserDefaults] objectForKey:@"WOHttpAllowHost"];
+  if ([port isKindOfClass: [NSString class]]) {
+    if ([port isEqualToString: @"auto"]) {
+      listeningAddress
+        = [[NGInternetSocketAddress alloc] initWithPort:0 onHost:@"127.0.0.1"];
+      [listeningAddress autorelease];
+    } else if ([port rangeOfString: @":"].location == NSNotFound && !allow)
+      port = [NSString stringWithFormat: @"127.0.0.1:%@", port];
   }
-  signal(_signal, signalHandler);
+  else {
+    if (allow)
+      listeningAddress =

-                    child, forkCount, strerror(errno));
-            continue;
-          }
-
-          clientStopTime = time(NULL);
-          uptime = clientStopTime - clientStartTime;
-          
