signal handler for sigchild working