Hi, I am trying to implement small multi threaded SSH application, on a IIS6. Code works fine without the Threads. But I get SSH'ish looking error when trying to use Threads. Can anyone offer any advice what I might be doing wrong? Perhaps a working example or a link to one. Below is the output of my code followed by simplified perl code I run. Thanks Mark
Btw, I have Perl v5.8.7 built for MSWin32-x86-multi-thread, with usethreads=define use5005threads=undef useithreads=define usemultiplicity=define OUTPUT produced: started thread 1 Remotehost1 started thread 2 Remotehost2 [Mon Sep 5 14:36:15 2005] remotecommand_mthread.pl: PARI: *** forbidden at C:/Perl/site/lib/Math/Pari.pm line 978. [Mon Sep 5 14:36:15 2005] remotecommand_mthread.pl: thread failed to start: PARI: *** unknown type 83. at C:/Perl/site/lib/Math/Pari.pm line 978. CODE snippets.... use Thread; use Net::SSH::W32Perl; .... .... for my $hostname (@ExecuteHost) { $ThreadHash->{$hostname} = Thread->new(\&RemoteExecute, $hostname, $RemoteCommand); print br, 'started thread ',$TotalHostsThreads, ' ', $hostname; } foreach my $hostname (keys %{$ThreadHash} ) { $TotalOutput .= $ThreadHash->{$hostname}->join; print 'ended thread ', $hostname, br; } .... .... sub RemoteExecute{ my $host = shift; my $rcmd = shift; my $ssh = new Net::SSH::W32Perl($host, [protocol => 1, port=>22]); $ssh->login(&GetAdminPassword($host)); ... my ($This_out, $This_err, $This_exit) = $ssh->cmd($rcmd); return $This_out; } __END__ _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs