What happens to the children of the process that calls setid ()?

Work on emulating a POSIX signal for Jehanne , I realized that it does not explain what happens to existing child processes that call setsid().

I wonder if they remain in the previous session and the process group or whether they will follow the parent in the new session.

And if they stay in the previous session / group, will the parent still get SIGCHLD when they exit?

+4
source share
1 answer
no

Nothing; they save their session. And SIGCHLD has nothing to do with sessions, but only the relationship between parents and children.

+4
source

Source: https://habr.com/ru/post/1690158/


All Articles