newlib-cygwin/newlib/libc/posix
Corinna Vinschen 3fbfcd11fb 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-08-03 12:41:44 +02:00
..
COPYRIGHT 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
Makefile.am Add generic implementation of dirfd() 2018-10-11 08:29:16 +02:00
Makefile.in Add generic implementation of dirfd() 2018-10-11 08:29:16 +02:00
_isatty.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
cclass.h Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
closedir.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
cname.h Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
collate.c Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00
collate.h 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
collcmp.c 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
creat.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
dirfd.c Add generic implementation of dirfd() 2018-10-11 08:29:16 +02:00
engine.c * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use 2012-10-16 18:45:24 +00:00
execl.c ansification: remove _HAVE_STDC 2018-01-17 11:47:30 -06:00
execle.c ansification: remove _HAVE_STDC 2018-01-17 11:47:30 -06:00
execlp.c ansification: remove _HAVE_STDC 2018-01-17 11:47:30 -06:00
execv.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
execve.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
execvp.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
fnmatch.3 Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
fnmatch.c 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
glob.3 Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
glob.c 2013-11-21 Julio Gutierrez <jgutleyva@gmail.com> 2013-11-21 17:04:57 +00:00
isatty.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
namespace.h 2008-11-24 Craig Howland <howland@LGSInnovations.com> 2008-11-24 21:27:33 +00:00
opendir.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
popen.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
posix.tex Use source files which have makedoc markup, but aren't processed or included. 2015-06-24 12:24:01 +01:00
posix_spawn.c Cygwin: posix_spawn: add Cygwin-specific code fixing process synchronisation 2020-08-03 12:41:44 +02:00
readdir.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
readdir_r.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
regcomp.c 2013-11-20 Chirayu Desai <chirayudesai1@gmail.com> 2013-11-20 16:25:50 +00:00
regerror.c 2013-11-20 Chirayu Desai <chirayudesai1@gmail.com> 2013-11-20 16:25:50 +00:00
regex.3 Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
regex2.h Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
regexec.c 2013-11-20 Chirayu Desai <chirayudesai1@gmail.com> 2013-11-20 16:25:50 +00:00
regfree.c 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
rewinddir.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
rune.h 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
runetype.h 2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org> 2008-11-19 17:13:13 +00:00
scandir.c scandir: Add support for struct dirent::d_type 2019-02-01 10:37:00 +01:00
seekdir.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
sleep.c 2006-06-05 Shaun Jackman <sjackman@gmail.com> 2006-06-06 15:41:10 +00:00
sysexits.h 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
telldir.c Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
un-namespace.h 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:03:42 +00:00
usleep.c 2006-06-05 Shaun Jackman <sjackman@gmail.com> 2006-06-06 15:41:10 +00:00
utils.h Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
wordexp.c newlib: wordexp: drop dangerous fprintf 2018-08-08 10:50:19 +02:00
wordexp2.h * libc/posix/wordfree.c (wordfree): The wrong words are freed 2012-10-09 12:05:51 +00:00
wordfree.c * libc/posix/wordfree.c (wordfree): The wrong words are freed 2012-10-09 12:05:51 +00:00