From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: problem with mmap and fork()
Date: Mon, 25 Feb 2019 12:26:00 -0000 [thread overview]
Message-ID: <231e8dc3c706a1fb50e5cc16b8621b81@smtp-cloud7.xs4all.net> (raw)
In-Reply-To: <CAJ1FpuNG7a2nrK0A90VKuT9dAe5pf+aRbJzr65=cgQMxQ8rsuQ@mail.gmail.com>
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
next prev parent reply other threads:[~2019-02-25 10:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-23 6:30 Glyn Gowing
2019-02-23 9:30 ` Doug Henderson
2019-02-23 12:54 ` Václav Haisman
2019-02-23 16:05 ` Doug Henderson
2019-02-23 22:11 ` Glyn Gowing
2019-02-25 10:03 ` Houder
2019-02-25 12:26 ` Houder [this message]
2019-02-25 12:43 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=231e8dc3c706a1fb50e5cc16b8621b81@smtp-cloud7.xs4all.net \
--to=houder@xs4all.nl \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).