Forks-Super

 view release on metacpan or  search on metacpan

examples/forked_harness.pl  view on Meta::CPAN

        Forks::Super::POSTFORK_CHILD {
            *Test::SSH::Backend::OpenSSH::_run_dir = sub { };
        };

        # first, try public key authentication for the current user and host
        my $userathost = $ENV{USER} . '@' . $ENV{HOSTNAME};
        my $ssh = Forks::Super::Config::CONFIG_external_program("ssh");
        if ($ssh && $userathost =~ /.@./) {
            my @cmds = ("true", "echo", "dir");
            foreach my $cmd (@cmds) {
                local $SIG{ALRM} = sub { die "ssh timeout $$ $0 @ARGV\n"; };
                alarm 15;
                if (eval {my $c1=system($ssh, $userathost, $cmd);$c1==0}) {
                    $ENV{TEST_SSH_TARGET} = "ssh://$userathost";
                    print STDERR
                        "... publickey on current user,host works!\n";
                    alarm 0;
                    last;
                }
                alarm 0;
            }

t/forked_harness.pl  view on Meta::CPAN

        Forks::Super::POSTFORK_CHILD {
            *Test::SSH::Backend::OpenSSH::_run_dir = sub { };
        };

        # first, try public key authentication for the current user and host
        my $userathost = $ENV{USER} . '@' . $ENV{HOSTNAME};
        my $ssh = Forks::Super::Config::CONFIG_external_program("ssh");
        if ($ssh && $userathost =~ /.@./) {
            my @cmds = ("true", "echo", "dir");
            foreach my $cmd (@cmds) {
                local $SIG{ALRM} = sub { die "ssh timeout $$ $0 @ARGV\n"; };
                alarm 15;
                if (eval {my $c1=system($ssh, $userathost, $cmd);$c1==0}) {
                    $ENV{TEST_SSH_TARGET} = "ssh://$userathost";
                    print STDERR
                        "... publickey on current user,host works!\n";
                    alarm 0;
                    last;
                }
                alarm 0;
            }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.000 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )