fork a child process exits safety

The parent process from a thread, execute:

int status = 0;
waitpid( pid, &status, 0 );
pid_t pid is the process ID of the child process

Guess you like

Origin www.cnblogs.com/lialin/p/12346782.html