Subject: setpgid manpage omission? (+other q)
To: None <netbsd-users@netbsd.org>
From: Peter Bex <Peter.Bex@student.kun.nl>
List: netbsd-users
Date: 12/17/2003 18:15:54
--1yeeQ81UyVL57Vl7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello all,

I have some questions about setpgrp(2)/setpgid(2).

- The manpage says:
"setpgid() sets the process group of the specified process pid to the
specified pgrp.  If pid is zero, then the call applies to the current
process."
Doesn't pgrp =3D=3D 0 have a special meaning as well? According to the (Red=
 Hat)
Linux manpage (no flames please, I'm just doing research):
"If  pgid  is  zero,  the  process ID of the process specified by pid is us=
ed."
If this is correct, the NetBSD manpage should be updated.

- What use does the statement setpgid(0,0) have? I don't see what that
would do. My initial guess is that it simply sets the process group of the
current process to the same it already is set to. What would be the benefits
of doing such an operation? I'm trying to port plugger 5.0 to pkgsrc-wip, a=
nd
it does this.

- Why the fsck does Linux do this:
"In the Linux DLL 4.4.1 library, setpgrp simply calls setpgid(0,0)."
if it's copied straight off the old BSD behaviour for backwards compatibili=
ty?

I'm a little confused here. My personal thoughts are that Linux is just bei=
ng
braindead here, and that setpgid doesn't do anything, but I just can't beli=
eve
that.

Regards,
Peter
--=20
http://www.student.kun.nl/peter.bex
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

--1yeeQ81UyVL57Vl7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/4I9KLg33BXzVMqsRAjmzAJ0ZBLNfy4D6lTFcBuIGsEyy2JLqqACgll3L
+Hs50ETr4sP1wcSumQpE/ys=
=fDcT
-----END PGP SIGNATURE-----

--1yeeQ81UyVL57Vl7--