Reputation: 11
After running this program
Segmentation fault (core dumped)
Code below:
use threads;
use Net::SSH::Perl;
my $host = 'hostname';
my $user = 'root';
my $password = 'root123';
my $thread = threads->new (\&ThreadEntry,"ls");
my $thread1 = threads->new (\&ThreadEntry,"ls -al ");
sub ThreadEntry()
{
my $ssh = Net::SSH::Perl->new($host, 35903);
print "in ssh function \n";
my($stdout, $stderr, $exit) =$ssh->cmd(@_);
print "$stdout $stderr $exit\n";
}
$thread->join();
$thread1->join();
Upvotes: 1
Views: 186
Reputation: 945
This is a known bug, see link below:
https://rt.cpan.org/Public/Bug/Display.html?id=62053
Upvotes: 1