aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-12-14 15:39:15 +0000
committerYang Tse <yangsita@gmail.com>2009-12-14 15:39:15 +0000
commit99daca5a48f8bce2b8455acc1693f9542c539f0a (patch)
tree31d9100d8a425594914ca28185f4813baae25f59
parenta6abbb120e579558ce6009ef906e0081217ce2e7 (diff)
Prevent perl script dying messages in output, since tearing down the pinpong
server in this way, upon sysread failures, is part of the expected behavior.
-rw-r--r--tests/ftpserver.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 812f77975..bf76f65de 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -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;