Process: now it removes the process from $processes if waitpid() returns -1, which means there's no such process.
I think this happens when the user reaps the child process.