O POSIX define sessões assim:
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. A newly created process joins the session of its creator. A process can alter its session membership; see setsid(). There can be multiple process groups in the same session.
Todos os grupos de processos pertencem a uma sessão. Os conceitos não são dependentes, então eu não diria que um grupo de processos é um conceito que existe somente dentro de uma sessão.
Os processos em segundo plano recebem seu próprio grupo de processos quando são criados, portanto, disown
ns não altera seu grupo de processos; disown
apenas manipula a tabela de tarefas do Bash :
disown
[-ar
] [-h
] [jobspec ...]Without options, remove each jobspec from the table of active jobs. If jobspec is not present, and neither the
-a
nor the-r
option is supplied, the current job is used. If the-h
option is given, each jobspec is not removed from the table, but is marked so thatSIGHUP
is not sent to the job if the shell receives aSIGHUP
. If no jobspec is supplied, the-a
option means to remove or mark all jobs; the-r
option without a jobspec argument restricts operation to running jobs. The return value is 0 unless a jobspec does not specify a valid job.