Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当程序使用 nohup 运行时,在幕后执行了什么?
父进程的PID是否被更改?
谢谢。
编辑:我知道 nohup (和 disown )会导致如果父进程收到 SIGHUP 则不会将其发送到进程。这是否意味着它相当于处理 SIGHUP (实际上忽略它)?
它相当于将SIGHUP处理程序设置为SIG_IGN,即。
SIGHUP
SIG_IGN
signal(SIGHUP, SIG_IGN);
使用来源,卢克!
(添加了额外的字符以保持新的答案长度规则满意。)
关于 nohup的维基百科文章很好地解释了它。