| delorie.com/archives/browse.cgi | search |
| 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:cc:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=fF7ZK14HIpyD0QrIaxSMYWmyzKy43EviLfYngGOv5nuVpUvKOTkSo | |
| hsphxxY+N3VFEMQ2/xcPsQhhFyngNexHvL+NIblpBNZsjiZ7sXb5QluOgdddZisK | |
| GSuyGeNcuwdA82czxA4ZBIxBgLeyzDJqBNOlrADfCjcfvF/OIoPu+s= | |
| 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:cc:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=E2pyOzjq87xW7R2i+nvjf6949cs=; b=y7/5Mobr/+ExH3n6iO3du2dTZTDf | |
| fQubDr/j3+1v3ZmZlJPk9SjpVnxhTuKZT+xHjr85JKG7nmHinnbGamaetWuwnTvZ | |
| UhNJE2l+3DFpH9GiyglqyNkiQ+PPXIOPU8TTphhRbbRGWvDNzI43pTbt4mMRhyhI | |
| Cm089Bpito4p/YY= | |
| 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-Spam-SWARE-Status: | No, score=-125.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=hurt, our |
| X-HELO: | mout.kundenserver.de |
| Date: | Fri, 8 Feb 2019 13:23:38 +0100 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | Michael Haubenwallner <michael DOT haubenwallner AT ssi-schaefer DOT com> |
| Cc: | cygwin AT cygwin DOT com |
| Subject: | Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.7 |
| Message-ID: | <20190208122338.GN13951@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | Michael Haubenwallner <michael DOT haubenwallner AT ssi-schaefer DOT com>, cygwin AT cygwin DOT com |
| References: | <announce DOT 20190205151855 DOT GD16130 AT calimero DOT vinschen DOT de> <02da4eeb-fcce-b1bc-e6eb-68ff3ec0cf74 AT ssi-schaefer DOT com> <20190207182735 DOT GG13951 AT calimero DOT vinschen DOT de> <8a2f041f-f8f7-6e17-5d97-5a168440009b AT ssi-schaefer DOT com> <20190208113158 DOT GH13951 AT calimero DOT vinschen DOT de> <17e339bb-2115-bf22-7291-04215aab3150 AT ssi-schaefer DOT com> <20190208122126 DOT GM13951 AT calimero DOT vinschen DOT de> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20190208122126.GM13951@calimero.vinschen.de> |
| User-Agent: | Mutt/1.10.1 (2018-07-13) |
--Q59ABw34pTSIagmi
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Feb 8 13:21, Corinna Vinschen wrote:
> On Feb 8 12:51, Michael Haubenwallner wrote:
> >=20
> >=20
> > On 2/8/19 12:31 PM, Corinna Vinschen wrote:
> > > On Feb 8 07:46, Michael Haubenwallner wrote:
> > >>
> > >> On 2/7/19 7:27 PM, Corinna Vinschen wrote:
> > >>> On Feb 7 17:14, Michael Haubenwallner wrote:
> > >>>> On 2/5/19 4:18 PM, Corinna Vinschen wrote:
> > >>>>> Hi folks,
> > >>>>>
> > >>>>>
> > >>>>> I uploaded a new Cygwin test release 3.0.0-0.7
> > >>>>>
> > >>>>
> > >>>>> Please test.
> > >>>>>
> > >>>>
> > >>>> There's another regression - regarding spawn, exec and waitpid,
> > >>>> loosing the exitstatus somewhere in between:
> > >>>>
> > >>>
> > >>> Any chance you could take a look? I haven't much time for Cygwin t=
he
> > >>> next couple of days.
> > >>
> > >> Ok, will do. Any hints probably?
> > >=20
> > > Thanks! The only thing coming to mind is the removal of the parent
> > > handle when switching PID method. Or maybe the permission restriction
> > > on the process handles?
> >=20
> > For now it seems like there's an inconsistency with PIDs:
> > A first process PID 100, receives PID 101 from spawn(),
> > but in the new process getpid() returns 102:
> >=20
> > $ ./dospawn /bin/bash -c 'echo $$'
> > 12625
> > waitpid: pid 12624 status 0x0
>=20
> Oh, hmm. If you call spawnve, rather than execve, a new child pid
> is generated in spawnve, rather than just keeping the callers pid.
>=20
> However, apparently the child invents its own pid in pinfo::thisproc
> after being spawned. But actually this should only occur for forked
> processes aore processes started from non-Cygwin parents.
Does that help, by any chance:
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 78506d43de29..0b274287d9f6 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -656,7 +656,7 @@ child_info_spawn::handle_spawn ()
!DuplicateHandle (GetCurrentProcess (), moreinfo->myself_pinfo,
GetCurrentProcess (), &h, 0,
FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
- h =3D NULL;
+ h =3D INVALID_HANDLE_VALUE;
=20
/* Setup our write end of the process pipe. Clear the one in the struct=
ure.
The destructor should never be called for this but, it can't hurt to =
be
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 445bd35b224e..d10c4fc4580c 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -62,6 +62,8 @@ pinfo::thisproc (HANDLE h)
cygheap->pid =3D create_cygwin_pid ();
flags |=3D PID_NEW;
}
+ else if (h =3D=3D INVALID_HANDLE_VALUE)
+ h =3D NULL;
=20
init (cygheap->pid, flags, h);
procinfo->process_state |=3D PID_IN_USE;
Corinna
--=20
Corinna Vinschen
Cygwin Maintainer
--Q59ABw34pTSIagmi
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxddMoACgkQ9TYGna5E
T6BkVw//eNfMD8zILZVkchE8SCaVwgwQRfsromskME5dJeRRwf5A4YR+ZOdgWFi2
6SI2KhZYZ+uZRoawjenHwZcGdL65lXxToepkUh+Y/qZXyL/wAAqslj9fXJWa50qe
mYATNqSLg2TlPqr8I8N/HMVOGYKKevNjiB8YCQzazlA9vZkUhWh5q3+7v8qbGAiO
gTQ5eH5ow7DeN2YvyzUOT5GiYWKLZXeoeDQFdz93byy3Wupi836ff+grxAgh6day
WnBjOiESJARX249oHMEFJaAE8J1RrpSatD3Uzi0f3jdFClb/9vjT/hPrCGlTGMJ2
BhnVtrtFLuvpmehvNqy2PiAcak4KCintrMTzIS+prKCcyStPjHTqYd6Bd0g5v7U2
mXnVldF+o0lDJL0i7ab67uv2fTu2sHCBSxcy5ZAJMIhFA8x4/1ZQTqzqBIfqfpWw
mEF7fvDzlv5vXLwpJMMEzuFnG2R8lCAZG4gz9SK1uI7RXgdt1xKSm1beP5gPKMBh
7spgNtOJfGQ2W25MjVPNLWK3RDU4viZPgImJZDuK3uxmJcxz4YSGnH6TIyWv9tZd
ylsIY7sRxohrA3l++CB1FTV0rbuLD1+FJoajpqLUVGD9jqCYIzF5VjlXC7KYH8Rn
25sl7opU/T1OKWiQGT2G/GgNxvvnP5gKpGIWEN/J2CWPQeaU6xg=
=GJAW
-----END PGP SIGNATURE-----
--Q59ABw34pTSIagmi--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |