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:mime-version:references:in-reply-to:from:date | |
:message-id:subject:to:content-type; q=dns; s=default; b=guv9/QK | |
2b0St+0+GImpuOZrIJrUAfPdWQYjfkoNZQQ2wBUMMu/tbB/TSJeJ34PG8sPbzxrZ | |
o81z4rZ5MrEPjeGXHOzPprIhD9hQsw+t9CvMBfk42fQoG2+rF6FIAAudHVMkNsRA | |
0K1QlXAWQW+wop2d74lDKxcfN/P1fFeSWZFQ= | |
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:mime-version:references:in-reply-to:from:date | |
:message-id:subject:to:content-type; s=default; bh=vrvJlGDqu6daD | |
d2azh1ZfyKBa34=; b=m1xJNjvGbNzMz6NFZsmWs1Jz9JUqRs4GBp5FJefqQuWgE | |
ygx/aeQ3pRLIMzur+Rpz08Jy61wj8Lw15wJarqV9cuKYWTIgjyhntHGh9Iq3v7D6 | |
/1njATXR2O0iMTxV/ynIyp9fo7I1oR+em9zba0Rc3kAdTU6J42OJccGaXeTpSs= | |
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=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Glyn, mutexes |
X-HELO: | mail-qt1-f181.google.com |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=fSM75GZaVUUDJVEyqKXAVl/wghf0dAT20UxkjxCaXF0=; b=RKVXXyPcdxCymzDRXSd289y3r0GaP2whzA98nNIfmXHgW39ZdE3zvt4xI4A4DIo0eC F39PJeuaKOhMbalTlRUoe1Mg1QACHTcXSVrCRZqJ6Fj6E/x2MjFxLLbmaaG0SzX6NSAP z2FFPxR74QRoUQcS7emW/bEZ0elwjJujVhdnI9qnLrTAZejvSZy5MF9XykfP/JtDqiE7 xUxX3/mURlUkbUhGXzT8nqt/l5SYWvB39UvVIAIgSCYXAAkPAQAER7Z8d6MSKuNpUldg jxHDFkQSm0M06cWe7X2tlQKcJsMe+XLornq8JojGIpkrCBhevJFIaZrsrSPpg1P2GNYY Vkxw== |
MIME-Version: | 1.0 |
References: | <CAAoGPJzdYcCDB=J4ZdfDq1xwLYvZBmT1rC937xHjMd8vseZ-=A AT mail DOT gmail DOT com> |
In-Reply-To: | <CAAoGPJzdYcCDB=J4ZdfDq1xwLYvZBmT1rC937xHjMd8vseZ-=A@mail.gmail.com> |
From: | Doug Henderson <djndnbvg AT gmail DOT com> |
Date: | Sat, 23 Feb 2019 05:54:18 -0700 |
Message-ID: | <CAJ1FpuNG7a2nrK0A90VKuT9dAe5pf+aRbJzr65=cgQMxQ8rsuQ@mail.gmail.com> |
Subject: | Re: problem with mmap and fork() |
To: | cygwin <cygwin AT cygwin DOT com> |
X-IsSubscribed: | yes |
--00000000000066605b05828f35f7 Content-Type: text/plain; charset="UTF-8" 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 > What happens in the buggy execution is that the child obtains a lock > before the parent releases it. I'm using mmap and a pthread_mutex_t > object along with fork(). Again, this exact code works correctly on my > Mac running Mojave. On further analysis, the call to > pthread_mutexattr_setpshared(attr, PTHREAD_PROCESS_SHARED); is failing. The error is EINVAL (22) Invalid argument. 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. I have attached my files: smtest2.c - my heavily modified version of OP's original. smtest2.txt - output from running this version.showing error. smtest3.c - my version which uses 2 pthreads in a single process smtest3.txt - output from running this version, showing OP's expected results. HTH Doug --00000000000066605b05828f35f7 Content-Type: text/plain; charset="US-ASCII"; name="smtest2.txt" Content-Disposition: attachment; filename="smtest2.txt" Content-Transfer-Encoding: base64 Content-ID: <f_jshheykw1> X-Attachment-Id: f_jshheykw1 Z2NjIC1zdGQ9YzExIC1wdGhyZWFkIC1XYWxsIC1XZXh0cmEgLVdlcnJvciAt byBzbXRlc3QyIHNtdGVzdDIuYyAmJiAuL3NtdGVzdDIKMjIgSW52YWxpZCBh cmd1bWVudApwdGhyZWFkX211dGV4YXR0cl9zZXRwc2hhcmVkOiBObyBlcnJv cgptYWtlOiAqKiogW01ha2VmaWxlOjMwOiBzbXRlc3QyXSBFcnJvciAxCg== --00000000000066605b05828f35f7 Content-Type: application/octet-stream; name="smtest3.c" Content-Disposition: attachment; filename="smtest3.c" Content-Transfer-Encoding: base64 Content-ID: <f_jshheyl42> X-Attachment-Id: f_jshheyl42 Ly8gc210ZXN0Mi5jDQovLw0KLy8gRHIuIEdseW4gR293aW5nDQovLyBMZVRv dXJuZWF1IFVuaXZlcnNpdHkNCi8vIENPU0MgNDY1MyAtIEFkdmFuY2VkIE5l dHdvcmtzDQovLw0KLy8gVGhpcyBwcm9ncmFtIGRlbW9uc3RyYXRlcyBob3cg dG8gdXNlIGEgbG9jayB3aXRoIGZvcmsoKWVkIHByb2Nlc3NlcyBieSB1c2lu Zw0KL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sZF9yb3V0aW5lLCAo dm9pZCAqKSBsb2NrKTsNCglpZiAoZXJyKSB7DQoJCXBlcnJvcigicHRocmVh ZF9jcmVhdGUgY2hpbGQiKTsNCgkJZXhpdChFWElUX0ZBSUxVUkUpOw0KCX0N CgllcnIgPSBwdGhyZWFkX2NyZWF0ZSgmcGFyZW50X3RocmVhZCwgTlVMTCwg KHZvaWQgKikmcGFyZW50X3JvdXRpbmUsICh2b2lkICopIGxvY2spOw0KCWlm IChlcnIpIHsNCgkJcGVycm9yKCJwdGhyZWFkX2NyZWF0ZSBwYXJlbnQiKTsN CgkJZXhpdChFWElUX0ZBSUxVUkUpOw0KCX0NCg0KCWVyciA9IHB0aHJlYWRf am9pbiggY2hpbGRfdGhyZWFkLCBOVUxMKTsNCglpZiAoZXJyKSB7DQoJCXBl cnJvcigicHRocmVhZF9qb2luIGNoaWxkIik7DQoJCWV4aXQoRVhJVF9GQUlM VVJFKTsNCgl9DQoJZXJyID0gcHRocmVhZF9qb2luKCBwYXJlbnRfdGhyZWFk LCBOVUxMKTsNCglpZiAoZXJyKSB7DQoJCXBlcnJvcigicHRocmVhZF9qb2lu IHBhcmVudCIpOw0KCQlleGl0KEVYSVRfRkFJTFVSRSk7DQoJfQ0KDQoJLy8g bW1hcCdlZCBtZW1vcnkgaXMgYXV0b21hdGljYWxseSB1bm1hcHBlZCB3aGVu IHRoZSBwcm9jZXNzIGVuZHMuDQoJcmV0dXJuIDA7DQp9DQo= --00000000000066605b05828f35f7 Content-Type: text/plain; charset="US-ASCII"; name="smtest3.txt" Content-Disposition: attachment; filename="smtest3.txt" Content-Transfer-Encoding: base64 Content-ID: <f_jshheyl83> X-Attachment-Id: f_jshheyl83 Z2NjIC1zdGQ9YzExIC1wdGhyZWFkIC1XYWxsIC1XZXh0cmEgLVdlcnJvciAt byBzbXRlc3QzIHNtdGVzdDMuYyAmJiAuL3NtdGVzdDMKMTU1MDkyNTg2NiAt IGJvdGggIDogYXR0ciwgbG9jaywgbG9jay0+b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RzIHRvIGxldCBjaGlsZCBjYXRjaCB1cC4K --00000000000066605b05828f35f7 Content-Type: application/octet-stream; name="smtest2.c" Content-Disposition: attachment; filename="smtest2.c" Content-Transfer-Encoding: base64 Content-ID: <f_jshheyki0> X-Attachment-Id: f_jshheyki0 Ly8gc210ZXN0Mi5jDQovLw0KLy8gRHIuIEdseW4gR293aW5nDQovLyBMZVRv dXJuZWF1IFVuaXZlcnNpdHkNCi8vIENPU0MgNDY1MyAtIEFkdmFuY2VkIE5l dHdvcmtzDQovLw0KLy8gVGhpcyBwcm9ncmFtIGRlbW9uc3RyYXRlcyBob3cg dG8gdXNlIGEgbG9jayB3aXRoIGZvcmsoKWVkIHByb2Nlc3NlcyBieSB1c2lu Zw0KLy8gc2hhcmVkIG1lbW9yeS4NCg0KI2luY2x1ZGUgPHN0ZGlvLmg+ICAg ICAgICAgLy8gbmVlZGVkIGZvciBwcmludGYNCiNpbmNsdWRlIDxzdGRsaWIu aD4gICAgICAgICAvLyBuZWVkZWQgZm9yIGV4aXQgLy8gZGpoDQojaW5jbHVk ZSA8c3RyaW5nLmg+ICAgICAgICAgLy8gbmVlZGVkIGZvciBzdHJlcnJvciAv LyBkamgNCiNpbmNsdWRlIDx0aW1lLmg+ICAgICAgICAgIC8vIG5lZWRlZCBm b3IgdGltZSAvLyBkamgNCiNpbmNsdWRlIDxzeXMvbW1hbi5oPiAgICAgIC8v IG5lZWRlZCBmb3IgbW1hcA0KI2luY2x1ZGUgPHVuaXN0ZC5oPiAgICAgICAg Ly8gbmVlZGVkIGZvciBmb3JrDQojaW5jbHVkZSA8cHRocmVhZC5oPiAgICAg ICAvLyBuZWVkZWQgZm9yIHRoZSBtdXRleCBhbmQgdGhlIG11dGV4YXR0ciBz dHJ1Y3RzIGFuZCBmdW5jdGlvbnMNCg0KDQovLyB0aGlzIGNyZWF0ZV9zaGFy ZWRfbWVtb3J5IGZ1bmN0aW9uIHdhcyBmb3VuZCBvbiBzdGFjayBleGNoYW5n ZS4NCnZ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bnRmKCIl bGQgLSBib3RoOiBwdGhyZWFkX211dGV4X2luaXQgZXJyb3I6ICVkICVzXG4i LCB0aW1lKE5VTEwpLCBlcnIsIHN0cmVycm9yKGVycikpOyAvLyBkamgNCgkJ ZXhpdChlcnIpOw0KCSB9DQoJcHJpbnRmKCIlbGQgLSBib3RoICA6IGF0dHIs IGxvY2ssIGxvY2stPm5leHQ6ICUxMXAgJTExcCAlMTFwXG4iLCB0aW1lKE5V TEwpLCAodm9pZCAqKWF0dHIsICh2b2lkICopbG9jaywgKHZvaWQgKikoKmxv Y2spKTsgLy8gZGpoDQoNCgkvLyBmb3JrKCkNCglpbnQgcGlkID0gZm9yaygp Ow0KDQoJaWYgKHBpZCA9PSAwKSAgLy8gY2hpbGQNCgl7DQoJCWNoaWxkX3Jv dXRpbmUobG9jayk7DQoJfQ0KCWVsc2UgIC8vIHBhcmVudA0KCXsNCgkJcGFy ZW50X3JvdXRpbmUobG9jayk7DQoJfQ0KDQoJLy8gbW1hcCdlZCBtZW1vcnkg aXMgYXV0b21hdGljYWxseSB1bm1hcHBlZCB3aGVuIHRoZSBwcm9jZXNzIGVu ZHMuDQoJcmV0dXJuIDA7DQp9DQo= --00000000000066605b05828f35f7 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --00000000000066605b05828f35f7--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |