So then the rule is: when a parent terminates, the child keeps on executing.
Indeed, you've forked a new process, but well behaved parents wait (or waitpid) on their children so they don't turn into zombies.
In reply to Re^4: fork(): when parent exits, what happens to child?
by rowdog
in thread fork(): when parent exits, what happens to child?
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |