in reply to How to optionally kill a child, and capture status if not killed.
Is your main problem that you're not sure where the child process's status ends up once wait returns? The docs say it ends up in $?.