Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Multithreading 对线程使用Net::ssh::perl模块时出现分段错误_Multithreading_Perl_Ssh - Fatal编程技术网

Multithreading 对线程使用Net::ssh::perl模块时出现分段错误

Multithreading 对线程使用Net::ssh::perl模块时出现分段错误,multithreading,perl,ssh,Multithreading,Perl,Ssh,运行这个程序之后 Segmentation fault (core dumped) 代码如下: 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 (\&Thread

运行这个程序之后

Segmentation fault (core dumped)
代码如下:

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();

这是一个已知的错误,请参阅下面的链接:

请在这个问题上添加更多信息,比如该计划应该做什么等。否则,该计划将面临关闭的真正风险。