server: Fix bug with unknown PID in SIGCHLD func