aboutsummaryrefslogtreecommitdiff
path: root/tests/ftp.pm
blob: 078dc61f2ad7b41d791f9510545b6286e8768411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# make sure no leftovers are still running
sub ftpkillslaves {
    my ($versbose) = @_;
    for $ext (("", "ipv6")) {
        for $id (("", "2")) {
            for $base (('filt', 'data')) {
                my $f = ".sock$base$id$ext.pid";
                my $pid = checkserver($f);
                if($pid > 0) {
		    printf ("* kill pid for %-5s => %-5d\n", "ftp-$base$id$ext", $pid) if($verbose);
                    kill (9, $pid); # die!
                }
                unlink($f);
            }
        }
    }
}

1;