1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Remove posix-w32 subsitutes that require access to process handles

Now that Guile uses the posix_spawn gnulib module, several of Guile's
custom w32 functions substitutes no longer work. Some functions
relied on populating and maintaining an internal PID-to-Handle database,
which is no longer possible.

kill, getpriority, setpriority, getaffinity and setaffinity
are removed. waitpid is simplified and does not handle ENOHANG.

* NEWS: updated
* libguile/posix-w32.c (struct proc_record, find_proc, proc_handle): removed
  (record_proc, delete_proc, prepare_child_handle, compenv): removed
  (prepare_envblk, lookup_cmd, prepare_cmdline, start_child): removed
  (kill, getpriority, setpriority, sched_getaffinity): removed
  (sched_setaffinity): removed
  (waitpid): modified to just use _cwait. ENOHANG emlation removed.
* libguile/posix-w32.h (CPU_ZERO, CPU_ISSET, CPU_SET, CPU_SETSIZE): removed
  (cpu_set_t, PRIO_PROCESS, PRIO_PGRP, PRIO_USER): removed
  (HAVE_START_CHILD, HAVE_KILL, HAVE_GETPRIORITY): removed
  (HAVE_SETPRIORITY, HAVE_SCHED_GETAFFINITY, HAVE_SCHED_SETAFFINITY): removed
  declarations for waitpid, start_child, kill, getpriority: removed
  declarations for setpriority, sched_getaffinity, sched_set_affinity: Removed
This commit is contained in:
Michael Gran 2023-06-20 15:46:35 -07:00
parent 2e51d3fa26
commit adbf2156ab
3 changed files with 29 additions and 1009 deletions

14
NEWS
View file

@ -68,6 +68,20 @@ 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.
** MinGW: remove kill, getaffinity, setaffinity, getpriority, and setpriority
Now that Guile uses a posix_spawn module, these Win32 emulations of
POSIX functions no longer work. They relied on Guile keeping an
internal handle-to-pid table, which is not part of the new posix_spawn
code. They are removed on MinGW.
** MinGW: waitpid returns ENOSYS if options are non-zero
When Guile switched to using posix_spawn module, Guile's Win32 emulation
of waitpid could no longer emulate ENOHANG. It relied on Guile keeping
an internal handle-to-pid table. It now returns ENOSYS on any non-zero
waitpid option.
* Performance improvements
** `copy-file` now relies on `sendfile` rather than a read/write loop