4fc922b2c8
So far, the mqd_t type returned a pointer to an allocated area under the hood. The mutex and event objects attached to the message queue were implemented as inheritable types. As unfortunate side effect the HANDLEs to these objects were inherited by exec'd child processes, even though all other message queue properties are not inherted, per POSIX. Fix this by converting an mqd_t to a descriptor, and create a matching fhandler_mqueue object to handle various aspects of the message queues inside the fhandler. Especially, create the IPC objects as non-inheritable and duplicate the HANDLEs as part of the fixup_after_fork mechanism. Drop using mmap and create the memory map with NT functions. This allows to control duplication of handle and mapping in the forked child process, without the requirement to regenerate the map in the same spot. It also allows to dup() the descriptor, as on Linux, albeit this isn't implemented yet. This patch is the first cut. There's a bit more to do, like moving more functionality from the POSIX functions into the fhandler and making sure the mqd_t type can't be used in other descriptor-related functions willy-nilly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> |
||
---|---|---|
.. | ||
CVSChangeLogs.old | ||
cygserver | ||
cygwin | ||
doc | ||
testsuite | ||
utils | ||
CONTRIBUTORS | ||
COPYING | ||
COPYING.LIB | ||
CYGWIN_LICENSE | ||
Makefile.am | ||
Makefile.am.common | ||
README | ||
acinclude.m4 | ||
autogen.sh | ||
configure.ac |
README
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin