ssh behavior - bugger!

djberg96 on 2002-02-23T04:00:21

After bothering Ben Trott more about the POSIX::setsid() problem I was having with Net::SSH::Perl, he finally pointed out to me that it appeared to be *normal* behavior for the program to hang because it's waiting for an EOF that it never receives.

I should have known that, right? Wrong. I went out to deja and into comp.security.ssh where I find exactly *one* post about the subject. It turns out that the behavior changed after 1.2.27 (according to Mr. Silverman). It *used* to terminate the connection without waiting for a return value, but they decided to change it. They also appear to have *not* documented it. More than one person was surprised by this.

Personally (and others seem to agree) I find this effing annoying. I mean, at least give us the *option* to terminate the connection when calling a process that backgrounds itself instead of *guessing* what it is we want. I mean, when you call a process you will *know* if it returns a value (and if you care about it).

A workaround was provided, though. Just send stdout of the program you call to /dev/null. I originally had stdout sent to the trash bin but commented that out because it was too handy for debugging purposes. Oops.

I'll play with this on Monday. Oh, and my apologies to Ben Trott for stating that there was a bug in Net::SSH::Perl - there isn't. There's a bug, er, feature in ssh.