Why is session defined on kernel level? Is it introduced exclusively for tty/job control?
2
votes
2
answers
165
views
I have read a lot of articles and questions/answers on this site about sessions. I understand what they represent ([source](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html)) :
> A collection of process groups established for job control purposes.
> Each process group is a member of a session. A process is considered
> to be a member of the session of which its process group is a member
However, my question is, is the session as part of the "core" of the kernel (part of the task structure) purely because of the terminal and job control? In other words, **is the goal of introduction just for that reason, or is the session introduced "for a higher purpose" and is used (or intended to be used) in other situations as well, where the terminal being just one of them?**
If it's true that it's only because of the terminal, I think it makes little sense to me. It could be implemented at the shell level (as is the case with job control).
I understand why process groups exist at the kernel level, for example to group processes and do something with them together (send a signal to entire group), but I don't understand the session, what do they bring to me at the kernel level...
Asked by Yakog
(517 rep)
Jan 19, 2025, 03:28 PM
Last activity: Jan 20, 2025, 03:53 PM
Last activity: Jan 20, 2025, 03:53 PM