]> sjero.net Git - wget/commitdiff
Avoid re-forking. Fixes bug #20458.
authorMicah Cowan <micah@cowan.name>
Fri, 23 May 2008 06:40:56 +0000 (23:40 -0700)
committerMicah Cowan <micah@cowan.name>
Fri, 23 May 2008 06:40:56 +0000 (23:40 -0700)
tests/ChangeLog
tests/FTPServer.pm

index f485f93c20cdb0b147cada02e93c2a05c8940bae..757ed339891fc6c41051df83edcebfc4775b36b0 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-22  Micah Cowan  <micah@cowan.name>
+
+       * FTPServer.pm (run): Avoid re-forking. Fixes bug #20458.
+
 2008-04-26  Micah Cowan  <micah@cowan.name>
 
        * Makefile.am, Test-proxied-https-auth.px: Added a test for
index 7c7f3e584b4f0ed0c774013b314aa1113a319f3a..d8ad8b0c919a049f80d9e530237c095c99259153 100644 (file)
@@ -833,14 +833,14 @@ sub run
         print STDERR "got a connection from: $client_ipnum\n" if $log;
 
         # fork off a process to handle this connection.
-        my $pid = fork();
-        unless (defined $pid) {
-            warn "fork: $!";
-            sleep 5; # Back off in case system is overloaded.
-            next;
-        }
-
-        if ($pid == 0) { # Child process.
+        my $pid = fork();
+        unless (defined $pid) {
+            warn "fork: $!";
+            sleep 5; # Back off in case system is overloaded.
+            next;
+        }
+
+        if (1) { # Child process.
 
             # install signals
             $SIG{URG}  = sub {