A better way to do this would be to use the backtick operator, which returns the return code for the process when it returns or use the system call. That way you know when it ends and then can do some clean up before or after it. I hope this helps.
In reply to Re: exec with cleanup
by cyocum
in thread exec with cleanup
by bart
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |