Subject: | Net-SFTP causes threads->join to segfault |
Date: | Thu, 19 Apr 2007 11:49:42 -0700 |
To: | bug-Net-SFTP [...] rt.cpan.org |
From: | Patrick J. McEvoy <swagman [...] skyrider.com> |
I can't find any documentation that states whether Net-SFTP
is thread-safe, but when I use it in a 'use threads' script,
join segfaults:
# cat /tmp/tpl
#! /usr/bin/perl -w
use strict;
use warnings;
use threads;
use threads::shared;
use Net::SFTP;
use Net::SFTP::Attributes;
sub hello() { print "hello world\n"; }
my $thread = threads->new(\&hello);
$thread->join;
# /tmp/tpl
hello world
Segmentation fault
#
If I comment out Net-SFTP, the script exits normally:
# cat /tmp/tpl
#! /usr/bin/perl -w
use strict;
use warnings;
use threads;
use threads::shared;
#use Net::SFTP;
#use Net::SFTP::Attributes;
sub hello() { print "hello world\n"; }
my $thread = threads->new(\&hello);
$thread->join;
# /tmp/tpl
hello world
#