add waitpid for childs