how to run a run a shell script in background even if i exit the terminal or logout,
the process end only when i kill with command kill
I have problem with a csh script. This script simply search for a certail process id and kill that using simple kill -5 <pid>. Everything is okay untill there is valid process id trapped.
Basically I want a bash script process, upon receiving a SIGINT, to kill all of its subprocesses before exiting.
I am trying to write a simple Korn shell script to execute a loading process. The process occasionally runs into connectivity issues, so I need to kill it if it runs too long.
I have been trying the following code:
. /home/dw/script/load.ksh &
Unfortunately, the kill command does not kill the process - am I missing something?
I have a shell script which runs in cronjob.
I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits.
The best that I've managed to come up with is this.
I'm trying to establish the following chained ssh tunnel:
ssh -A -t gatewayuser@gatewayserver 'ssh -N -A -t -R 55520:127.0.0.1:55520 user@dbserver' &
This is part of a shell script, I want the tunnel to be established in the background so the shell script can continue what it is doing.
I would like to kill a specific java-process via a shell script.
I know that kill -9 $(pidof java) will kill it, yet it will also kill all other java processes. I know that the java-process I would like to kill is the one that was started as the last one.
I am writing one shell script in which I have parent process and it has child processes which are created by sleep & command. Now I wish to kill the parent process so that the child process will be also killed.