diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-04-28 07:36:55 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-04-28 07:36:55 +0000 |
commit | 8cf17862965ab409ecac07f1330352bd78d362b8 (patch) | |
tree | c33ab3e73a28415fe04bed0aea5f7fca284d3766 | |
parent | 51b17b299ca3aadeed9abdae27ab7859398fc944 (diff) |
kill slave processes when they fail
-rw-r--r-- | tests/ftpserver.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 6559b0ba0..a3837f934 100644 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -111,6 +111,8 @@ sub startsf { my $pong = <SFREAD>; if($pong !~ /^PONG/) { + logmsg "Failed sockfilt command: $cmd\n"; + kill(9, $sfpid); die "Failed to start sockfilt!"; } open(STDIN, "<&SFREAD") || die "can't dup client to stdin"; @@ -526,8 +528,9 @@ sub PASV_command { my $pong = <DREAD>; if($pong !~ /^PONG/) { + kill(9, $slavepid); sendcontrol "500 no free ports!\r\n"; - logmsg "couldn't find free port\n"; + logmsg "failed to run sockfilt for data connection\n"; return 0; } @@ -647,7 +650,8 @@ sub PORT_command { my $pong = <DREAD>; if($pong !~ /^PONG/) { - logmsg "sockfilt failed!\n"; + logmsg "Failed sockfilt for data connection\n"; + kill(9, $slavepid); } logmsg "====> Client DATA connect to port $port\n"; |