fork出的子进程安全退出

父进程起一个线程,执行:

int status = 0;
waitpid( pid, &status, 0 );
pid_t pid 是子进程进程号

猜你喜欢

转载自www.cnblogs.com/lialin/p/12346782.html