Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jan 2020 01:10:57 +0100
From:      Christoph Moench-Tegeder <cmt@burggraben.net>
To:        Peter <peter@citylink.dinoex.sub.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: session mgmt: does POSIX indeed prohibit NOOP execution?
Message-ID:  <20200106001057.GA64665@elch.exwg.net>
In-Reply-To: <op.0dxynipoaas8k8@localhost>
References:  <op.0dxynipoaas8k8@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
## Peter (peter@citylink.dinoex.sub.org):

> When a program is invoked via /usr/sbin/daemon, it should already be
> session leader AND group leader, and then the above code WOULD be a
> NOOP, unless POSIX would require the setpgid() to fail and thereby the
> program to abort - which, btw, is NOT a NOOP :(

https://pubs.opengroup.org/onlinepubs/9699919799/
 "The setpgid() function shall fail if: [...] The process indicated by the
  pid argument is a session leader."

Not much room to argue?

Regards,
Christoph

-- 
Spare Space



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200106001057.GA64665>