Date: Thu, 28 Feb 2002 23:17:00 +0900 From: Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> To: Bruce Evans <bde@zeta.org.au> Cc: Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>, Takanori Saneto <sanewo@ba2.so-net.ne.jp>, <current@FreeBSD.ORG> Subject: Re: setpgrp(1, 1) does not FAIL Message-ID: <200202281417.g1SEH0Gd031607@bunko> In-Reply-To: <20020228220337.V52334-100000@gamplex.bde.org> References: <200202271703.g1RH2xwo042796@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> <20020228220337.V52334-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Feb 2002 22:14:56 +1100 (EST), Bruce Evans <bde@zeta.org.au> 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 <tanimura@r.dl.itc.u-tokyo.ac.jp> <tanimura@FreeBSD.org> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202281417.g1SEH0Gd031607>