Re: fork and hanging



nazrat <newtan@xxxxxxxxx> wrote:

In this setting, I have an 'expect' script (spawn.exp) used to cache
the password and feed it to spawned processes (ssh.pl). I am not sure
if there is any animosity between Perl fork and ssh that I am not
aware of?

% ./spawn.exp ./ssh.pl

I think I'd try having ssh.pl call spawn.exp, not the other way around.
If a single expect is trying to talk to many different processes over
the same file handles at the same time, I wouldn't be surprised if things
often go awry.


....

exec 'ssh', "build-$id", 'uname', '-a';

exec "./spawn.exp ssh build-$id uname -a";

Or something like that, I don't use expect.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.