[ILUG] kill signals
Adrian Flynn
adrian.flynn at worldtravel.ie
Fri Jan 11 09:35:49 GMT 2002
Hi
What is the correct kill signal to close a process and ALL its child
processes cleanly? I am trying to stop and restart a shell script which
pipes serial port data through several text procesing command. THere are 4
processes in the process table for the script. When I kill -SIGINT, or
kill -SIGTERM the shell processes, the other child processes remain running.
Note it is important that all files are properly closed on termination so I
cannot use SIGKILL.
The command line is of the form:
cat /dev/ttyS0 |tr '\r' '\n' |csplit --digits=10 --prefix=~/`date
"+%Y-%m-%d-%H:%M:%S"`_ --elide-empty-files - /^L/ {*}
This, within a shell script, results in the following processes:
bash
cat
tr
csplit
If I SIGINT or SIGTERM the bash process, the others remain running
Many thanks in advance
Adrian
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.309 / Virus Database: 170 - Release Date: 17/12/2001
More information about the ILUG
mailing list