added sigchld handler