I am trying to call a function using nohup
like this:
function1(){
while true
do
echo \"function1\"
sleep 1
done
}
Instead of using nohup, which is tailored for files, you can implement the same result like this:
(trap '' HUP INT
while true
do
echo "function1"
sleep 1
done
) &1 1>nohup.out &
As I tend to launch these processes from a parent script and the parent script may do other work if the parent process is interrupted I want the child process to ignore the INT signal and keep on running.