I think you'd have to do is fork a child for each and manage a pipe. You'd
have to manage your own read from the pipe, timeout, move to the next one,
etc. You should look at the Expect.pm module. It will do all this for you,
acting directly against the ssh binary (or an ssh-perl script that you
write). It creates pipes from the child to your controlling process. You can
have multiple processes that you are controlling at one time. If you need a
quick start, search the archives. I posted an example of using Expect.pm 3-4
months ago.
Mark
----- Original Message -----
From: "Ofer Nave" <on...@sh...>
To: <ssh...@li...>
Sent: Tuesday, January 11, 2005 2:12 PM
Subject: [Ssh-sftp-perl-users] non-blocking command execution
> Is there a way to use Net::SSH::Perl to execute commands remotely in a
> non-blocking fashion? I'm developing a distributed application and want
> to be able to execute a command on ten remote machines, and be able to
> manage the connections in a single process.
>
> -ofer
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Ssh-sftp-perl-users mailing list
> Ssh...@li...
> https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users
|