Bug in Net::SSH::Perl - argh!

djberg96 on 2002-02-14T20:44:10

My grand plans for a distribution script I wrote came to a screeching halt when I discovered a bug in Net::SSH::Perl.

The 'cmd()' method hangs if you call a process that auto-backgrounds itself via POSIX::setsid(). The code in question is within the SSH1.pm module, under the 'CLOOP' block if you're interested. I spent about 4 hours trying to debug and fix the thing, but couldn't get it to work right.

One fix (closing all IO::Handles) seemed to work on Solaris, but didn't work on Linux, but I couldn't test with exactly the same script, so I'm not 100 percent sure about that as a cause.

I've notified Ben (including sample programs for testing) and he hasn't really come back with a solution - that tells me it's tougher than I thought. That has me worried. Net::Telnet didn't seem to have any problem with it, so it looks to me like some issue with either IO::Handle or IO::Select.

Blech...