Re: How to kill a background ssh process?
- From: clodoaldo.pinto@xxxxxxxxx
- Date: 18 Aug 2006 12:16:53 -0700
Darren Tucker wrote:
On 2006-08-18, clodoaldo.pinto@xxxxxxxxx <clodoaldo.pinto@xxxxxxxxx> wrote:
I need to have a background ssh tunnel.
It is setup like this:
$ ssh -n -N -C -o "StrictHostKeyChecking no" -L 5433:localhost:5432
It needs to eventually be killed and restarted with another server IP.
What I'm doing is sending it a SIGTERM and it works but leaves a
defunct process. This is not too big a deal but I want it clean.
So whatever's spawning ssh isn't catching the SIGCHLD when it exits and
wait()ing for the exit status?
Exactly. I just wait()ed for the exit status and all is good now.
Thanks, Clodoaldo PInto