• Uncategorized

About linux : How-can-bash-script-become-zombie

Question Detail

I have bash script which starts some childs using this command:

 ./run_task.sh 2>&1 &

At some point child task become zombie and i have no idea why this happens.
As far as i know shell will invoke wait for child processes on its own,
so it’s not required to manually call wait for bash script child.
Child doesn’t call any exec (but call some C++ binaries synchronously).

Whatever i try i cannot reproduce such behavior.
Is there any way to make bash script a zombie?

Bash:

GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

System:

“RedHatEnterprise Linux Server release 7.9 (Maipo)” 7.9 Maipo

EDIT:
The parent at the moment child becomes zombie is running, so this child will be zombie forever since it doesn’t get bound to init process

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.