From: "Rajnikant" <[EMAIL PROTECTED]>
> I was trying to use SFTP in multithreaded application. I observed many
> segmentation faults there.
> Following is the code snipet:
>
> use threads;
> use Net::SFTP;
>
> my $thrId = 1;
> my $thread = threads->new (\&ftpThreadEntry,$thrId);
> $thrId = 2;
>
Rajnikant wrote:
>
> I'm using perl 5.8.8.
> I don't have any clue about whether Net::SFTP is thread safe or not.
>
> But I used Net::SFTP::Foreign instead of Net::SFTP and it started working
> :).
>
> Now I'm facing some different problem :(.
>
> If I try calling Net::SFTP::Foreign->ls method i
ject: Re: about SFTP and Thread dependency
On Wed, May 28, 2008 at 9:29 AM, Rajnikant
<[EMAIL PROTECTED]> wrote:
snip
> $sftp = Net::SFTP::Foreign->new($host_l,%args);
> my $err = $sftp->error(); # I get 'Password not requested as expected:
> -1' msg
>
{
print("=== not returned anything\n");
}
}
}
}
$thread->join();
Do anyone have any guess?
Thanks for replies.
Thanks and Best regards,
~ Rajnikant
Software Engg.
Persistent Sys. Ltd.
Ph. +91 98222 04088
-O
On Wed, May 28, 2008 at 01:33:59PM +0530, Rajnikant wrote:
> I was trying to use SFTP in multithreaded application. I observed many
> segmentation faults there.
> Following is the code snipet:
>
> use threads;
> use Net::SFTP;
Is Net::SFTP thread safe?
Are you using a recent version of Perl?
>
Hi all,
I was trying to use SFTP in multithreaded application. I observed many
segmentation faults there.
Following is the code snipet:
use threads;
use Net::SFTP;
my $thrId = 1;
my $thread = threads->new (\&ftpThreadEntry,$thrId);
$thrId = 2;
print("Creating second thread \n");
my $thread1 =