I'm trying to properly emulate POSIX signals handling and job control for my pet operating system, but it's not clear to me what should happen to a session after the session leader exits.
I cannot find documentation related to what happens to the session and its process if, for example, a child kills the session leader while several background processes and a different foreground process are running.
My tests show that all the process in the session are killed, but how?
Do they receive a specific signal?
Is this case specified in the POSIX standard? And if so, can you provide some references?