in reply to Re^7: Script hangs when executing command over ssh
in thread Script hangs when executing command over ssh

Thank you and this is a good suggestion.

In debugging I have found that perl hangs in Net::SSH::Perl::SSH2 in the routine 'sub client_loop' in the line 'my($rready, $wready) = $select_class->select($rb, $wb);' but I do not have enough understanding to see why. I hope you or some kind monks can shed some light on this.

Also it is strange the same works with output to STDOUT.

  • Comment on Re^8: Script hangs when executing command over ssh

Replies are listed 'Best First'.
Re^9: Script hangs when executing command over ssh
by marinersk (Priest) on Jun 18, 2015 at 21:03 UTC

    I agree it is strange; but I will fall back on my first comment here:

    • STDOUTis handled "normally" -- I'll go out on a limb here and characterize it as "system-level buffered stream I/O" and pray I didn't just embarrass myself (more than usual) with that line.  :-) Thus, it behaves normally.
    • STDERR, on the other hand, seems to get "special" handling -- some kind of additional buffering beyond the standard "system-level buffered stream I/O". My guess is that herein, in this extra handling, that we've tripped on a landmine; and thus hoping that by piping it to a file, we circumvent the problem.

Re^9: Script hangs when executing command over ssh
by marinersk (Priest) on Jun 19, 2015 at 21:20 UTC

    So...did it work?