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=cdJRMoLmxVzliDUKIJln0FeR+gxOXQxpQ62gSssDBqi8jg98fNOEB PuTjOlFwYtFrqEDUNaKRGXF7FcZ5ml3FdCkIK60RI01yAasAhY554WCNvQYw9ZqK LbI2+zUPZwDyjRRcDcS3ao06rzvFRhK+TxMCZOIZyL+CsxbeUII/ZQ= 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=IbB7hy5wrhxXX/12oCYrIyhNdYU=; b=RYlWtr3ozgWJ+zb9CEXevEXa1rub fd9Sms1dTbfo534AwD0r8K6pxiCRMt8P+tN7Ce/XIF68qcr34+oGR7L+ID3HsBwf 3d1EJBnmsbxRI+VYLIO0lxLBhGsN6+PAvgxVOPF9BqDcpFVkwFbhrW5APhcOP5vQ fooamb6AXZCx2UY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-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 Date: Mon, 25 Feb 2019 13:26:04 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: problem with mmap and fork() Message-ID: <20190225122604.GI4133@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <231e8dc3c706a1fb50e5cc16b8621b81 AT smtp-cloud7 DOT xs4all DOT 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) --MGu/vTNewDGZ7tmp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--