You need to use waitpid(3) or wait(1) in the parent code to wait for the child to ... the result of execvp() and use that value in exit() as you suggested.
確定! 回上一頁