]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Prevent perl script dying messages in output, since tearing down the pinpong
authorYang Tse <yangsita@gmail.com>
Mon, 14 Dec 2009 15:39:15 +0000 (15:39 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 14 Dec 2009 15:39:15 +0000 (15:39 +0000)
server in this way, upon sysread failures, is part of the expected behavior.

tests/ftpserver.pl

index 812f779757f6b9cb5c79da743e90962c5841a7a7..bf76f65deadd4837376a311eccba0f414311a39a 100644 (file)
@@ -169,13 +169,14 @@ sub sysread_or_die {
         logmsg "Error: ftp$ftpdnum$ext sysread error: $!\n";
         kill(9, $sfpid);
         waitpid($sfpid, 0);
+        logmsg "Exited from sysread_or_die() at $fcaller " .
+               "line $lcaller. ftp$ftpdnum$ext sysread error: $!\n";
         unlink($pidfile);
         if($serverlogslocked) {
             $serverlogslocked = 0;
             clear_advisor_read_lock($SERVERLOGS_LOCK);
         }
-        die "Died in sysread_or_die() at $fcaller " .
-            "line $lcaller. ftp$ftpdnum$ext sysread error: $!\n";
+        exit;
     }
     elsif($result == 0) {
         ($fcaller, $lcaller) = (caller)[1,2];
@@ -183,13 +184,14 @@ sub sysread_or_die {
         logmsg "Error: ftp$ftpdnum$ext read zero\n";
         kill(9, $sfpid);
         waitpid($sfpid, 0);
+        logmsg "Exited from sysread_or_die() at $fcaller " .
+               "line $lcaller. ftp$ftpdnum$ext read zero\n";
         unlink($pidfile);
         if($serverlogslocked) {
             $serverlogslocked = 0;
             clear_advisor_read_lock($SERVERLOGS_LOCK);
         }
-        die "Died in sysread_or_die() at $fcaller " .
-            "line $lcaller. ftp$ftpdnum$ext read zero\n";
+        exit;
     }
 
     return $result;