Non-POSIX compliant setpgrp(2)

Jilles Tjoelker jilles at stack.nl
Sun Jun 20 23:00:58 UTC 2010


On Sun, Jun 20, 2010 at 02:24:00AM -0700, Garrett Cooper wrote:
> On Sun, Jun 20, 2010 at 2:20 AM, Garrett Cooper <yanefbsd at gmail.com> wrote:
> >    Looks like setpgrp was added to BASE in recent versions of the POSIX spec:

> > http://www.opengroup.org/onlinepubs/000095399/functions/setpgrp.html

> >    The void argument format contradicts what's in BSD (and Linux), so
> > it looks like POSIX isn't compliant with anyone else...

> Scratch that. It's just BSD...

setpgrp() is under the XSI option and usual FreeBSD policy is to prefer
traditional BSD to XSI.

Furthermore, the setpgrp() function is marked as obsolescent in the 2008
version of the standard (you are linking to the 2001 version). One of
the reasons for this is that the semantics are poorly defined: it is
unspecified whether it creates a new session or a new process group.

-- 
Jilles Tjoelker


More information about the freebsd-standards mailing list