Skip Menu |

This queue is for tickets about the Net-SFTP CPAN distribution.

Report information
The Basics
Id: 26496
Status: rejected
Priority: 0/
Queue: Net-SFTP

People
Owner: Nobody in particular
Requestors: swagman [...] skyrider.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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 #
Presumably it's not thread safe. Please try Net::SSH2, and if it isn't thread safe, then file a bug for it and I will take a look. Net::SFTP is in maintenance-only mode.