in reply to Not getting the expected result when using eval/alarm
I'd be inclined to sprinkle here: goto here; type code through openRemote where you do SSH stuff to see if you can reproduce the error.
I'd guess though that it's a problem with the SSH stuff. Read the IPC::Open2 docs, especially from the para starting open2() does not wait for and reap the child process .... Following paras warn of deadlock situations that may or may not apply in your case.
The next debugging step is probably to emit a log line after each SSHWrite/SSHRead operation and see where things are hanging up that way.
You might change:
print SSHWrite "echo XXXXX Started OK \n" ; print SSHWrite "echo \$HOSTNAME\n" ; SSHWrite->autoflush();
to:
print SSHWrite "echo XXXXX Started OK \necho \$HOSTNAME\n" ; SSHWrite->autoflush();
or:
print SSHWrite "echo XXXXX Started OK \n" ; SSHWrite->autoflush(); print SSHWrite "echo \$HOSTNAME\n" ; SSHWrite->autoflush();
|
---|