What is the differences between process group and process session?

  • Follow


I find on the Internet that a process session may contain several process groups.

However, I am not really understand what does a process group mean and what does 
a process session mean? I tried to find on the Internet about the terms, but 
only manual of setsid and setpgid found. :(
Would anyone like to tell me where to find the answer?

Thank you in advance.
-- 
Steven Ding
dwj<at>asia.com
0
Reply Steven 3/3/2004 8:14:34 AM

In article <c2446p$sv5@netnews.proxy.lucent.com>,
 Steven Ding <dwj@asia.com> wrote:

> I find on the Internet that a process session may contain several process 
> groups.
> 
> However, I am not really understand what does a process group mean and what 
> does 
> a process session mean? I tried to find on the Internet about the terms, but 
> only manual of setsid and setpgid found. :(
> Would anyone like to tell me where to find the answer?

The simplest explanation is that a session is typically all the 
processes connected to a particular controlling terminal.  A process 
group is a set of processes that are working together; in a shell using 
job control, all the processes in a job will be in the same process group

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0
Reply Barry 3/3/2004 8:23:50 AM


Barry Margolin wrote:

> In article <c2446p$sv5@netnews.proxy.lucent.com>,
>  Steven Ding <dwj@asia.com> wrote:
> 
> 
>>I find on the Internet that a process session may contain several process 
>>groups.
>>
>>However, I am not really understand what does a process group mean and what 
>>does 
>>a process session mean? I tried to find on the Internet about the terms, but 
>>only manual of setsid and setpgid found. :(
>>Would anyone like to tell me where to find the answer?
> 
> 
> The simplest explanation is that a session is typically all the 
> processes connected to a particular controlling terminal.  A process 
> group is a set of processes that are working together; in a shell using 
> job control, all the processes in a job will be in the same process group
> 

Thank you for you explanation.
However, if a process simply forks a child and the child forks the grandson, 
etc, all these processes are in the same group? Am I right?

Thanks.
-- 
Steven Ding
dwj<at>asia.com
0
Reply Steven 3/3/2004 11:06:37 AM

In article <c24e9b$u9@netnews.proxy.lucent.com>,
 Steven Ding <dwj@asia.com> wrote:

> However, if a process simply forks a child and the child forks the grandson, 
> etc, all these processes are in the same group? Am I right?

Right.  Until a process uses a system call that establishes itself as a 
process group leader or joins some other process group, it is part of 
its parent's process group.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0
Reply Barry 3/3/2004 6:21:27 PM

3 Replies
732 Views

(page loaded in 0.093 seconds)

Similiar Articles:













7/21/2012 3:42:41 AM


Reply: