[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to kill child process?
From: |
Sebastian Miele |
Subject: |
Re: how to kill child process? |
Date: |
Mon, 24 Aug 2020 01:08:52 +0200 |
Me:
> vapnik spaknik <vapniks@yahoo.com> writes:
>
> >> ssh -S ~/.ssh/%C -N -f remotehost &
> >> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file1
> backupdir/file1
> >> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file2
> backupdir/file2
> >
> > and finally, find the pid and kill the ssh session:
> >
> >> ps -e|grep ssh
> >> kill <PID>
>
> This does not answer your exact question, but such behavior can be
> acheived very automatically by putting something like the following into
> ~/.ssh/config:
>
> ControlMaster auto
> ControlPath ~/.ssh/socket/%C
> ControlPersist 5
>
> This automatically creates master processes.
Or not, if there currently already is one, in which case that one is used.
And the respective master
> processes automatically terminate after 5 seconds.
>
After 5 seconds of being without at slave.
>
- how to kill child process?, vapnik spaknik, 2020/08/23
- Re: how to kill child process?, Sebastian Miele, 2020/08/23
- Re: how to kill child process?, Sebastian Miele, 2020/08/24
- Re: how to kill child process?, vapnik spaknik, 2020/08/24
- Re: how to kill child process?, Sebastian Miele, 2020/08/24
- Re: how to kill child process?, Sebastian Miele, 2020/08/24
- Re: how to kill child process?, vapnik spaknik, 2020/08/24
- Re: how to kill child process?, Sebastian Miele, 2020/08/24
- Re: how to kill child process?, vapnik spaknik, 2020/08/25