当前位置: 技术问答>linux和unix
AUPE中关于创建会话
来源: 互联网 发布时间:2016-05-01
本文导语: AUPE9.5节说调用setsid()的进程不是进程组的组长,就会创建一个新会话。 为什么进程组组长不能创建? | Every process group is in a unique session. By convention, the session ID of a session equals ...
AUPE9.5节说调用setsid()的进程不是进程组的组长,就会创建一个新会话。
为什么进程组组长不能创建?
为什么进程组组长不能创建?
|
Every process group is in a unique session.
By convention, the session ID of a session
equals the process ID of the first member
of the session, called the session leader.
The result of setsid() is that the current
process (with process ID pid) becomes session
leader of a new session.
lz 要明白的是 setsid() 是为了使非 session leader 成为 session leader,
而对应的 session 还没有存在,当然需要创建啦
对于 session leader 的进程,已经是 session leader 了,
对应的 session 已经存在了,还需要创建吗
By convention, the session ID of a session
equals the process ID of the first member
of the session, called the session leader.
The result of setsid() is that the current
process (with process ID pid) becomes session
leader of a new session.
lz 要明白的是 setsid() 是为了使非 session leader 成为 session leader,
而对应的 session 还没有存在,当然需要创建啦
对于 session leader 的进程,已经是 session leader 了,
对应的 session 已经存在了,还需要创建吗