首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
善后专题
实现孤儿进程(孤儿进程会被 init 进程收养善后,所以没什么危害)
有关孤儿进程的讲解: 孤儿进程讲解博客传送门 1 #include <stdio.h>2 #include <stdlib.h>3 #include <errno.h>4 #include <unistd.h>5 6 int main(){7 8 pid_t pid = fork();9 if(pid < 0){10 perror("fork error:")
阅读更多...