don't exit just the fork, but also the main processes.

A little bit difficult to read but it works.