newlib-cygwin/winsup
Corinna Vinschen db9a26faa4 Cygwin: posix_spawn: add Cygwin-specific code fixing process synchronisation
Newlib's posix_spawn has been taken from FreeBSD.  The code relies on
BSD-specific behaviour of vfork, namely the fact that vfork blocks
the parent until the child exits or calls execve as well as the fact
that the child shares parent memory in non-COW mode.

This behaviour can't be emulated by Cygwin.  Cygwin's vfork is
equivalent to fork.  This is POSIX-compliant, but it's lacking BSD's
vfork ingrained synchronization of the parent to wait for the child
calling execve, or the chance to just write a variable and the parent
will see the result.

So this requires a Cygwin-specific solution.  The core function of
posix_spawn, called do_posix_spawn is now implemented twice, once using
the BSD method, and once for Cygwin using Windows synchronization under
the hood waiting for the child to call execve and signalling errors
upstream.  The Windows specifics are hidden inside Cygwin, so newlib
only calls internal Cygwin functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-10-14 10:54:25 -04:00
..
CVSChangeLogs.old
cygserver Cygwin: fix GCC 8.3 'local external declaration' errors 2020-10-14 10:53:56 -04:00
cygwin Cygwin: posix_spawn: add Cygwin-specific code fixing process synchronisation 2020-10-14 10:54:25 -04:00
doc Cygwin: Add --nokill dumper option 2020-10-14 10:54:25 -04:00
lsaauth
testsuite Use remove-advertising-clause script to edit BSD licenses 2020-10-14 10:54:10 -04:00
utils Cygwin: Speed up dumper 2020-10-14 10:54:25 -04:00
CONTRIBUTORS Cygwin: Add David Macek to CONTRIBUTORS 2020-10-14 10:54:17 -04:00
COPYING
COPYING.LIB
CYGWIN_LICENSE
Makefile.common
Makefile.in
README
acinclude.m4
aclocal.m4
autogen.sh
c++wrap
ccwrap
config.guess
config.sub
configure Cygwin: seteuid: disable unused funcs and lsaauth subdir 2019-01-28 10:24:18 +01:00
configure.ac Cygwin: seteuid: disable unused funcs and lsaauth subdir 2019-01-28 10:24:18 +01:00
configure.cygwin
install-sh

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