in reply to Explicitly kill a Net::OpenSSH connection?

undef $ssh; That should not leave ssh zombies behind, if it does, it's a bug on the module.

Replies are listed 'Best First'.
Re^2: Explicitly kill a Net::OpenSSH connection?
by rastoboy (Monk) on Aug 03, 2011 at 13:57 UTC
    Gotcha Salva. I wonder--is there a difference between setting the variable to '', as opposed to using undef?

    I did try using the private method _kill_master and it seems to work...but I know it's marked private for a reason.

      _kill_master is called from the DESTROY method when the object goes out of scope, so there is usually no need to call it explicitly.

      In any case, I don't fully understand your message, did undef $ssh solve your problem at all?

      If the answer is no, activate the module debugging and post here the output:

      $Net::OpenSSH::debug = -1;