Date: Thu, 15 Mar 2012 11:33:23 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Ed Schouten <ed@80386.nl> Cc: arch@freebsd.org Subject: Re: kill(2) man page: ESRCH Message-ID: <20120315093323.GL75778@deviant.kiev.zoral.com.ua> In-Reply-To: <20120314234348.GL27469@hoeg.nl> References: <20120314234348.GL27469@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--Xu/gmhi9npES5AGc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 12:43:48AM +0100, Ed Schouten wrote: > Hi all, >=20 > Just a quick question. The kill(2) man page says: >=20 > The kill() system call will fail and no signal will be sent if: >=20 > [ESRCH] The process id was given as 0 but the sending pro= cess > does not have a process group. >=20 > My question is: is this possible? I thought all processes have a process > group. POSIX also doesn't mention anything about this case specifically. > Shall I zap this? I think this is a bad wording in the man page, up to the point of error. If the kill pid argument is negative, and corresponding process group cannot be found, then ERSCH is returned, look at the killpg1(9) implementation. The case of pgrp =3D=3D 0 indeed cannot result in ESRCH. The later loop over pg_members shall find at least the sender itself, if pgrp =3D=3D 0. --Xu/gmhi9npES5AGc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9ht2MACgkQC3+MBN1Mb4iGuwCfQTq2tRKHcpBVhQwcJNKxbimV B2sAoM0aU2Ux6Yi1mBw1P/dM9Wg/fAU3 =jiX0 -----END PGP SIGNATURE----- --Xu/gmhi9npES5AGc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120315093323.GL75778>