BUGFIX: child process counter synchronization

* src/main.c
Avoid race condition on child process counter by blocking SIGCHLD in
main() (while changing counter value).