From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28176 invoked by alias); 25 Feb 2019 12:26:10 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 28156 invoked by uid 89); 25 Feb 2019 12:26:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Henri X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Feb 2019 12:26:08 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MYeV3-1gSZQs1bvP-00Vhq2 for ; Mon, 25 Feb 2019 13:26:05 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id B78FAA80959; Mon, 25 Feb 2019 13:26:04 +0100 (CET) Date: Mon, 25 Feb 2019 12:43:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: problem with mmap and fork() Message-ID: <20190225122604.GI4133@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <231e8dc3c706a1fb50e5cc16b8621b81@smtp-cloud7.xs4all.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MGu/vTNewDGZ7tmp" Content-Disposition: inline In-Reply-To: <231e8dc3c706a1fb50e5cc16b8621b81@smtp-cloud7.xs4all.net> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-02/txt/msg00413.txt.bz2 --MGu/vTNewDGZ7tmp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1462 On Feb 25 11:51, Houder wrote: > On Sat, 23 Feb 2019 05:54:18, Doug Henderson wrote: >=20 > > On Fri, 22 Feb 2019 at 17:01, Glyn Gowing <> wrote: > > > I have a program (attached) that works correctly on my mac but does > > > not work with Cygwin on Windows 10. I'm running the latest version of > [snip] >=20 > > On further analysis, the call to > > > pthread_mutexattr_setpshared(attr, PTHREAD_PROCESS_SHARED); > > is failing. The error is EINVAL (22) Invalid argument. > >=20 > > This suggests that pthread mutexes cannot be shared between processes > > by using shared memory in cygwin. I have not attempted to determine if > > this is working as expected, or if this is a bug, or a limitation in > > the Windows environment. >=20 > For the record, this (i.c. PTHREAD_PROCESS_SHARED) is not yet supported on > Cygwin. >=20 > winsup/cygwin/thread.cc >=20 > 3636 extern "C" int > 3637 pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared) > 3638 { > 3639 if (!pthread_mutexattr::is_good_object (attr)) > 3640 return EINVAL; > 3641 /* we don't use pshared for anything as yet. We need to test PROCE= SS_SHARED > 3642 *functionality > 3643 */ > 3644 if (pshared !=3D PTHREAD_PROCESS_PRIVATE) > 3645 return EINVAL; <=3D=3D=3D=3D > 3646 (*attr)->pshared =3D pshared; > 3647 return 0; > 3648 } >=20 > Henri Needless to say that patches in this area are welcome, I guess. Corinna --=20 Corinna Vinschen Cygwin Maintainer --MGu/vTNewDGZ7tmp Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxz3twACgkQ9TYGna5E T6AoNxAAosqOuLjQtdwqR+fZRn9Vyp62qdFmUQosHfp5iYfM1fi3Srfy3xZWkyEi WnlrLhdfDzJZF7FhIrD/K+JIB2FO3bG1cETREWXPFiUaOjkirJQB0Ipa5e4miDr9 6Xb5podR+yED0cmu6exJi82kinhDVa/DG8NriJ07QXzfDRm9U6dpsOAmcUPlqrqA LdMjDMMoFD7SOGaVp3/mjX7cUc5tYjadnFyxbBv6NyDPmVVjVd6BxpiipNV66Pvk aaOnqipMEEh1uZFCWhKvZW5OHmEg9UbfR7GZxJSArXU4KLDyDwMg+nZ7zsA8flUc P71V20/eiCnp5rR4RwElXCgwH1CrbUKuvkNHeFkXuASyxTMOWRPrLxc3lRq/Yjhj tM+fAadmCJKYsRP9vTKavOrDqPA2BKP0EtWO4Q881t6p2vAXFu56Mn1nEkgQWKDb KhsVas17b8V4c4r0heawu6XMciVwgY0wazppkUeT4iZPkakEpp6CyJ5AWKlQ1aMu PCgfTVvKFAEXlqu5RgLNsiR0u/VGDKvPC2mJSpM4svxyUt1/wHAgwZLz+dcR9RBr bDudXT64WFdBaK+BESpGgNf+5A5yLHKGdOrY2zOc4X82kj8Y0ajo+Qo5qZYS+QMM Bf+1SctkXCdCjg5SDxbUtGNDIS+Du2wbjypWniDYNcBSCpJsXMo= =gfbT -----END PGP SIGNATURE----- --MGu/vTNewDGZ7tmp--