On Thu, 28 Feb 2002 22:14:56 +1100 (EST),
  Bruce Evans <[EMAIL PROTECTED]> said:

Takanori> Can you look into PR kern/29844 as well?
Takanori> I think after your fix, it should fail even when invoked by super
Takanori> user.
>> 
>> The superuser fails as well.

bde> setpgrp() is the same as setpgid() in FreeBSD, and the POSIX.1-200x-draft7
bde> documentation for setpgid() doesn't seem to have any special cases for
bde> the superuser, so I think the documentation change in the PR is correct.

While we are here, it would be even better to clarify the requirements
of setpgid(2) like this:


The affected process must:

o be a descendant of the invoking process, and

o belong to the same session as the invoking process does.


Takanori's test fails even by the superuser because pid 1 belongs to a
different session from curproc's one.


bde> POSIX now has setpgrp(), but it is quite different from setpgid() :-(.

Not sure if this is what you mean, but setpgrp(2) of Solaris is
somewhat like setpgid(0, 0).

Spaking of Solaris, the required condition of setpgid(2) in Solaris is
a little bit more strict than that in FreeBSD. Solaris prohibits the
grandchildren of the curproc to be the target of setpgid(2), while
FreeBSD allows that.

-- 
Seigo Tanimura <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to