delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/25/05:53:25

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:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=tSqeb5
UedVxXIWc+YIysmDRE9kroIYP+tAagp9dHoMgiOcM3cu+8sdjcdf5osLxFTpMY/9
CLmVSnuQEtMYWRxDFqC9dxr12MR7FrU4s9hO7QJtUO6KyypAuVAdyAfgSx18VpjH
mlheYzPUQ6XA79YetWbmzfiDMPJorhL4b/MII=
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:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; s=default; bh=3G/RZU/JwIWs
jva24PCYWDjjPjk=; b=Q5+W4Xh20Iwe9iFw/0L9p8OGYh00u5+mJLmr5WPU4Lsi
w6M1g5Ck4Ukq3pRmSjrFfMRoaYb6snyqBudR5ZWPWBFWxoi/sflCrqGDux2NMqq9
Hq8XrWGqO4YNEYSOrRBbDq+VR3MdreEOqhMH5sm2yoXSTkAPHSn+tqEn/jbA+HQ=
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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=*attr, H*F:D*nl
X-HELO: lb1-smtp-cloud7.xs4all.net
Date: Mon, 25 Feb 2019 11:51:09 +0100
Message-ID: <231e8dc3c706a1fb50e5cc16b8621b81@smtp-cloud7.xs4all.net>
From: Houder <houder AT xs4all DOT nl>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: problem with mmap and fork()
References: <CAAoGPJzdYcCDB=J4ZdfDq1xwLYvZBmT1rC937xHjMd8vseZ-=A AT mail DOT gmail DOT com> <CAJ1FpuNG7a2nrK0A90VKuT9dAe5pf+aRbJzr65=cgQMxQ8rsuQ AT mail DOT gmail DOT com>
In-Reply-to: <CAJ1FpuNG7a2nrK0A90VKuT9dAe5pf+aRbJzr65=cgQMxQ8rsuQ@mail.gmail.com>
User-Agent: mua.awk 0.99

On Sat, 23 Feb 2019 05:54:18, Doug Henderson  wrote:

> 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]

> 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.

For the record, this (i.c. PTHREAD_PROCESS_SHARED) is not yet supported on
Cygwin.

winsup/cygwin/thread.cc

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 PROCESS_SHARED
3642    *functionality
3643    */
3644   if (pshared != PTHREAD_PROCESS_PRIVATE)
3645     return EINVAL; <====
3646   (*attr)->pshared = pshared;
3647   return 0;
3648 }

Henri


--
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

- Raw text -


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