[lkml]   [1996]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: setsid() semantics changed...
>Now a process that gets spawned by a shell that sets up the process group
>for it (so it's the leader of it's own group, not session) cannot do
>a setsid() anymore because the "if (p->pgrp == current->pid)" check will
>match on itself.

Any program that does a setsid() should fork first, because
shells that do the above get horribly confused by programs that
call setsid() and are still under the shell's control.

Ergo: I personally do not think that the new semantics are wrong.

>But that could easily break POSIX conformance, I don't know...

It does break POSIX, at least, if what Stevens says in APitUE
(my substitute for POSIX :) is correct:

pid_t setsid(void);
This function returns an error if the caller is already a
process group leader.
Michiel Boland <>
University of Nijmegen
The Netherlands

 \ /
  Last update: 2005-03-22 13:38    [W:0.078 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site