Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Forking and Net::SSH::Perl

by salva (Canon)
on Apr 05, 2011 at 08:29 UTC ( [id://897456]=note: print w/replies, xml ) Need Help??


in reply to Forking and Net::SSH::Perl

You can not share an Net::SSH::Perl connection between different processes. It just doesn't work.

You have to open a new connection from every child. If that slows down your script too much, reimplement it using a workers+queue aproach.

And BTW, you can get OpenSSH packed for Solaris from Sunfreeware. Net::OpenSSH does support sharing the SSH connection with child processes.

Replies are listed 'Best First'.
Re^2: Forking and Net::SSH::Perl
by eff_i_g (Curate) on Apr 05, 2011 at 14:34 UTC
      Thread::Queue may be a good choice as sharing data between threads is easier than between processes but you will have to check that Net::SSH::Perl and its dependencies are thread safe.

      In any case, I am not an expert in that area, you will probably get better answers if you post a new question.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://897456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2025-12-11 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (91 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.