孤儿进程组

为什么有"孤儿进程组"

刺猬@http://blog.csdn.net/littlehedgehog

 

 

学习最忌讳的是等把所有内容都自以为学到手后,才突然慌神地反问自己“学这个是干什么的?”“这个究竟有什么用”。如果学一门学问到最后都不知道有什么用那最好别忙学,先看看它究竟在实际中运用到那些地方。中国教育大部分时间都是在教学生如何解题,所以当高数学了一学年最后吭哧吭哧考了个优后,竟然还要问自己"这个... 高数学,我没看见有什么用阿?"

 

 

APUE对于孤儿进程组的起源语焉不详,我这里从GNU摘来一段,清楚地解释了为什么会提出孤儿进程组的概念:

 

When a controlling process terminates, its terminal becomes free and a new session can be established on it. (In fact, another user could log in on the terminal.) This could cause a problem if any processes from the old session are still trying to use that terminal.

To prevent problems, process groups that continue running even after the session leader has terminated are marked as orphaned process groups.

When a process group becomes an orphan, its processes are sent a SIGHUP signal. Ordinarily, this causes the processes to terminate. However, if a program ignores this signal or establishes a handler for it, it can continue running as in the orphan process group even after its controlling process terminates; but it still cannot access the terminal any more.

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值