Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

djberg96
  (email not shown publicly)

Journal of djberg96 (2603)

Friday February 22, 2002
11:00 PM

ssh behavior - bugger!

[ #3060 ]
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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.