Posted on 2010-10-14 11:03:57.308668-07 by falan95054
Net-SSH2 channel output and threads
I'm trying to use Net::SSH2::Simple with threads. I'm creating local instances of Net::SSH2 in each thread, presumably with separate SSH connections. I have a command on the server that generate one line of output and one that generates a table.
- one line output no threads, no problem - one line output threads, no problem - multi-line output no threads, no problem - multi-line output threads, loops indefinately in Simple->cmd() while (!$chan->eof())
Is there some data structure that would be shared between difference instances of Net::SSH2 that needs thread synchronization? Alan
Direct Responses: 13004 | 13099 | 13320 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.