On Mon, 12 Feb 2001, Jonathan Wilson wrote:

> At 08:25 PM 2/10/2001 -0800, you wrote:
> >
> >Try:
> >
> >        trap 'kill 0' 0 1 2 3
> >
> >This should cleanup all the children.
> 
> Do I then need to change "function cleanup ()" to
> "function kill 0 ()" ? Can it be two words like that? or
> is this something more generic that doesn't need a
> declaration. 

No need for a function... just put the trap in the main
script toward the beginning. The `0' signal of the trap will
cause the "kill 0" to be unconditionally executed when the
script exits. The `1 2 3' can be considered redundant.

-- 
John Darrah (u05192)    | Dept: N/C Programming
Giddens Industries      | Ph: (425) 353-0405 #229
PO box 3190             | Ph: (206) 767-4212 #229
Everett  WA    98203    | Fx: (206) 764-9639



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to