1

Lazyweb: POSIX Process Groups and Sessions

 2 years ago
source link: https://0pointer.net/blog/projects/pgrp-vs-session.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Dear Lazyweb,

I have trouble understanding what exactly POSIX process groups and sessions are good for. The POSIX docs are very vague on this. What exactly is the effect of being in a process group with some other process, and what does being in the same session with it add on top? And what is the benefit of being a group/session leader in contrast of just being a normal random process in the group/session?

The only thing I understood is that kill(2) with a negative first parameter can be used to "multicast" signals to entire process groups, and that SIGINT on C-c is delivered that way. But, is that all? The POSIX docs say "... for the purpose of signaling, placement in foreground or background, and other job control actions", which is very vague. What are those "other job control actions?". What does job control persist of besides multicasting signals? And what is "placement in foreground or background" other than delivering signals?

And I totally don't get POSIX sessions and how they differ from POSIX process groups. Please enlighten me!

Puzzled,
    Lennart


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK