Re: How to kill a background ssh process?



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
1.2.3.4 &

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

.



Relevant Pages

  • Installation error
    ... Setup cannot continue. ... Press any key to Exit" ... this message displays when I put the Microsof Windows ... server 2003 Enterprise Edition in CD drive of server to ...
    (microsoft.public.windows.server.general)
  • Clickstream log of user activity
    ... I need to log and track all activity of visitors on my website., ... exit page. ... How do I setup my server to log a unique ...
    (microsoft.public.inetserver.iis)
  • TCP server eating up the whole CPU
    ... A TCP server using polland a threaded-client to send the messages to ... int main ... exit(EXIT_FAILURE); ... memset(&servaddr, '\0', sizeof(struct sockaddr_in)); ...
    (comp.unix.programmer)
  • Re: windows time slower than 10 mins
    ... SBS server sync with an external time source. ... This newsgroup only focuses on SBS technical issues. ... -tz print the local time zone info and exit. ... frequency determined during synchronization, then exit. ...
    (microsoft.public.windows.server.sbs)
  • Re: Socket Programming Problem
    ... number to the server and server increments the number and sends it back to ... the client. ... exit(EXIT_FAILURE); ... if(bind(sockfd, (struct sockaddr*) &server_str, ...
    (comp.unix.programmer)