Killing a background process
I have a shell script:
#!/bin/sh ./hello.sh >> /tmp/x & tail -f /tmp/x exit 0 when i do Ctrl-c tail -f /tmp/x killed hello.sh does not kill. How to kill this background process using Ctrl-c ? |
Ctrl-C kills the current foreground process. If you want to kill a backgrounded process, either
1. don't background it Or 2. get the pid and kill that eg Code:
./hello.sh >> /tmp/x & |
All times are GMT -5. The time now is 08:20 AM. |