Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've searched around a bit, and have bee unable to find this information.
If someone has a link to a useful document or forum, it would be much appreciated.
In short, I would like to know, in detail, what exactly process and session identifiers are and how they work.
How are they assigned? What does it mean to create a new session? When are new sessions created, and what happens when a process forks. What is and is not inherited by the child? Can you kill a session? If so, what happens when you do? etc. etc.
The PID is as you said a Process ID. It is a way to manager what ever process is attached to that ID. That is due to how processors and the kernel looks at things. IE DHCPD is the human name we use but once the daemon is spawned it will hook on to the system and be given an ID to be managed. Of course this is just a very high level look. this may help you http://linux.die.net/man/7/credentials
Thank you, this page does answer some of my questions.
Although I am still uncertain about a few things, like what occurs when a process creates a new process group (so it is the process group leader), forks additional children, and then exits.
If a process group exists with multiple processes, and the process group leader exits, who becomes the new process group leader? Or is it now a process group with no leader? Do sessions and and groups work the same only on two different tiers?
Try here this will cover the rest. http://linuxgazette.net/133/saha.html
Let me if this doesn't cover the rest. I will try my best to answer any other questions.
Thank you, this page does answer some of my questions.
Although I am still uncertain about a few things, like what occurs when a process creates a new process group (so it is the process group leader), forks additional children, and then exits.
If a process group exists with multiple processes, and the process group leader exits, who becomes the new process group leader? Or is it now a process group with no leader? Do sessions and and groups work the same only on two different tiers?
The correct term is Parent Process. So yes you could say that then Parent Process will be linked to all child processes. if the Parent process is killed then all children processes will be killed. Sounds gory huh with all this killing and what not. Ok bad joke. Better not quite my daytime job to become a comedian.
It's not the killing that's so bad, but the fact that they are just children!
Anyway.
So, parent process dies, so does all the children. Seems to make sense, based on what I read here: http://linux.die.net/man/1/kill.
What if the children are set up to catch and ignore any signal that they can? Kill just sends a signal, which the parent could exit on and the children could ignore.
It's not the killing that's so bad, but the fact that they are just children!
Anyway.
So, parent process dies, so does all the children. Seems to make sense, based on what I read here: http://linux.die.net/man/1/kill.
What if the children are set up to catch and ignore any signal that they can? Kill just sends a signal, which the parent could exit on and the children could ignore.
Never heard or seen that happen but I am sure that could be coded. But I view it like a tree with the brances being the child. If you cut a limb off the tree is still there. but you cut the trunk off the whole tree goes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.