Completed sigchld_handler function.