This commit is contained in:
parent
58cc03b9b6
commit
1f11d41e9f
|
@ -28,6 +28,12 @@ int main(void)
|
|||
// }
|
||||
// fock创建进程
|
||||
// fock创建的子进程一般用来执行新的程序
|
||||
/**
|
||||
* 创建一个信号量用于唤醒进程
|
||||
* 子进程睡眠10s
|
||||
* 父进程睡眠1s后,把子进程叫醒
|
||||
* 子进程结束后,父进程结束
|
||||
*/
|
||||
signal(SIGUSR1,weak_process);
|
||||
pid_t pid = fork();
|
||||
if (pid == 0)
|
||||
|
|
Loading…
Reference in New Issue