fix -Wextra warning for gcc
fixing child process termination problem