delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/08/12/06:15:12

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=vkjyA8DVH4KpDhdDoo3pF8/seQIy2f9WsbHalFy1V9igAh3jjylm8
mdh+ba4pIsUAQc8yMPR8CA/qfAHXj2OMLxbTHNOdtheW2fdCGgcDSwox3br50pNP
I2HTxLVNJhRaPkn0vuC0ser3QSIUZQ+6dGiyxZ7+jA8wce1ql4h+JE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=blgXGWJq5BXR+4XcmtTqtLTyexc=; b=VRZ1fANABHZxByCkTMjPEHPHG18x
AP8I7nNWfktN01F0b2opWUdQfyMJeGAByWye+FNJi4hRtkeySWZL8WSBzYJW4GJa
XeA1ZVgq5QkKNiCbZO6YKVB84MzHy+tWboh6gFAhCg7dF2EEpu2nir1lB/ZywfZn
so3FiESezrhwVBA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-95.1 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=H*i:mmySsrnL, H*f:sk:zEDRAXi, H*f:CAOTD34aZ, H*i:CAOTD34aZ
X-HELO: calimero.vinschen.de
Date: Fri, 12 Aug 2016 12:14:42 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 2.5.1: kill(pid, sig) before waitpid() returns -1 for sig != 0
Message-ID: <20160812101442.xljlwtty4elc2csp@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAOTD34Yv+namnsv+QNL2F-_c+W1-3ZdxZsgPQP8nxBEPNndcgw AT mail DOT gmail DOT com> <20160811141305 DOT 3em7tpcrxsushraa AT calimero DOT vinschen DOT de> <CAOTD34aZ=mmySsrnL=zEDRAXivJ1QcSdHsxxz2UyaABo4PXbWw AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAOTD34aZ=mmySsrnL=zEDRAXivJ1QcSdHsxxz2UyaABo4PXbWw@mail.gmail.com>
User-Agent: Mutt/1.6.2-neo (2016-07-23)

--e3visnxabsuhb4nj
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Erik,

On Aug 12 10:44, Erik Bray wrote:
> On Thu, Aug 11, 2016 at 4:13 PM, Corinna Vinschen
> <corinna-cygwin AT cygwin DOT com> wrote:
> > On Aug 11 11:51, Erik Bray wrote:
> >> [...]
> >> In response to the originally issue, this was fixed *specifically* for
> >> the case of kill(pid, 0).  But my reading of the above is that kill()
> >> should return 0 in this case regardless of the signal (modulo
> >> permissions, etc.).  On Linux, for example, when calling kill with pid
> >> of a zombie process the kernel will happily deliver the signal to the
> >> relevant task_struct; it will just never be acted on since the task
> >> will never run again.
> >
> > I'm not sure why cgf only fixed that for sig 0 at the time, since, as
> > you noted, the text from POSIX-1.2008 does not state that this is
> > *restricted* to sig 0.
>=20
> Yep, my thoughts exactly.

Funny that nobody noticed at the time, even thought the full POSIX text
was quoted.

> >> The below (untested) patch demonstrates the change I'm suggesting,
> >> though I don't know what other code, if any, might be involved in
> >> this.
> >
> > The original patch laid the groundwork by making sure that there are
> > two states, EXITED and REAPED.  Removing the explicit check for 0 is
> > the right thing to do, afaics, so I tested and applied your patch as is,
> > see
> > https://cygwin.com/git/?p=3Dnewlib-cygwin.git;a=3Dcommitdiff;h=3D86f79a=
f827729f3968d8b3b8f860ac29d200da0d
>=20
> Thank you so much!  I think this is much better behavior.
>=20
> (And thanks for the correction of my name--I'm used to it being
> misspelled but rarely do people notice and correct :)

I belong to the misspelled kind myself (Corrina?  No, Corinna!  Can't
you read?), so I was quite embarrassed when I did it myself :}


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--e3visnxabsuhb4nj
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXraGSAAoJEPU2Bp2uRE+gL2QP/0t9iq7nlcpUFON67CadA3ob
bE8K0vTB6oife03ZXrkzkQ+0dZUrk6zshntGMaYKIccks38ceDcC2hQQkmrWhoI6
JWzoB6XwW+4r+8kNfu1I4Bjc8eNHhTrNFxco6JAmdxLvAg5XG8UQaFBfXO77Nw1p
RzdtYJrufSlp+1NvZGp4ljaoIUISbEyyS7Md3XCZXNChaDUHiDsBcTp3Y+hCXpCt
Sz2gPUJ10VifmgyQ1/rH4Rif9ILvfE+oipNcCRXUkw6WsX0uxGw8YOp0RDoTe/Jl
Mmruo7khvO5gZEdJqVg/5RjiDF5qMqVqosg/MdbFj6F5drSlJmR6CUzS6h8J/9Xs
dHwVT9DqwsFXsWY50v3lRFRrd6RwuGI8G6gDGnAbVVbLOnM7yphHJAsdbYHaonJ0
vipSBjOP44qGEyw/tHzGCas9XnePY9T8UMLalidD8hmULi7qLt3lKOIdFckgpzf6
ewQO9OxEXmxCDt08l/gfvNcwJ0mo3515WTK1Kj4Iyq32OLiaHSuwNEt2sRRRPHS4
3WBZMYisX/Rq+M8OSJ663HT8R/G6j2sIh60pKuIANIjCaVPUPtrrMjvbSDzFgrUg
FQLEr75Ra0YpW1rZA5sNDmXjPkqwV2DLR+DxX0vrUQ1YNyUOCNREPLl7u2RVOU9J
GzNfeqsfUjQtvtnEEd18
=potg
-----END PGP SIGNATURE-----

--e3visnxabsuhb4nj--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019