in reply to Net::SSH::Perl hangs(during cmd), but only in Mason environment

I had the same problem with Net::SSH::Perl in an Apache::ASP environment, and finally found that STDIN and STDOUT were not set (fileno() returned -1). Adding this workaround to the beginning of the script helped for me:

open(STDIN, '<&=', 0); open(STDOUT, '>&=', 1);

Regards, Jo.

  • Comment on Re: Net::SSH::Perl hangs(during cmd), but only in Mason environment
  • Download Code

Replies are listed 'Best First'.
Re^2: Net::SSH::Perl hangs(during cmd), but only in Mason environment
by Anonymous Monk on Apr 07, 2012 at 00:09 UTC
    Folks, I am facing the same problem, so wondering if you found a solution for this !!! Thanks ~!