父进程退出之后,子进程会发生什么?

在linux中,所有进程都有一个共同的父进程systemd,如果父进程退出了,子进程还没运行结束,子进程会被stsremd收养 下面用一个小程序来验证一下: #include <cstdio> #include <sys/types.h> #include <unistd.h> #include <errno.h> #include <string.h> int func(int x); in
相关文章
相关标签/搜索