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 = threads->new (\&ftpThreadEntry,$thrId);
 
sub ftpThreadEntry()
{
   my $ThrId = shift;
   print (" Thread $ThrId in ftpThreadEntry func\n");
}
 
$thread->join();
$thread1->join();

My Observations :
 
1. If we comment out 'use Net::SFTP' then this code runs fine without
segmentation fault.
2. If we uncomment 'use Net::SFTP', it gives segmentation fault :(.
 
Can anyone experienced such situation? Is there any dependency in these
modules or 
I'm doing it wrong?
 
Thanks in advance.
 

~~~~~~~~~~~~~~~~~~~~

Thanks and Best regards,

~ Rajnikant

Software Engg.

Persistent Sys. Ltd.

Ph. +91 98222 04088

 

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

Reply via email to