1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Allow piped-process and system* to exist when fork is undefined

piped-process only uses fork to match legacy behavior, but on systems
that never had fork, there is no need to match that behavior.
piped-process and system* can be provided without fork.

* libguile/posix.c (piped_process): allow function definition without HAVE_FORK,
    but stub out internal dummy process with HAVE_FORK
  (restore_sigaction, scm_dynwind_sigaction, scm_system_star): don't
    require HAVE_FORK
  (scm_init_popen): don't require HAVE_FORK
  (scm_init_posix): don't require HAVE_FORK to add posix feature or
    register popen extension
This commit is contained in:
Michael Gran 2023-06-20 15:38:54 -07:00
parent 87402c849e
commit 9c86c5936e
2 changed files with 12 additions and 5 deletions

8
NEWS
View file

@ -60,6 +60,14 @@ capability to search for "libfoo" as "msys-foo.dll" on MSYS.
The load-foreign-library option #:rename-on-cygwin? has been changed to
#:host-type-rename?, and handles both Cygwin and MSYS.
** Make piped-process and system* available on systems without fork
Now that piped-process and system* are implemented in terms of
`posix_spawn', they can be made available on systems without fork().
Note that currently Guile does use fork in piped-process to set exit
codes, so piped-process on systems without fork will have a different
behavior with regards to exit codes.
* Performance improvements
** `copy-file` now relies on `sendfile` rather than a read/write loop