Hello! Andrew Whatson <what...@gmail.com> skribis:
> commit c012d7b0d5248a99a3a92780687a676c5d420f5f > Author: Andrew Whatson <what...@gmail.com> > Date: Thu Dec 8 21:43:28 2022 +1000 > > Reduce redundant close() calls when forking on some systems. > > Some systems provide "/proc/self/fd" which is a directory containing an > entry for each open file descriptor in the current process. We use this > to limit the number of close() calls needed to ensure file descriptors > aren't leaked to the child process when forking. > > * libguile/posix.c (close_inherited_fds_slow): > (close_inherited_fds): New static helper functions. > (scm_spawn_process): Attempt to close inherited file descriptors > efficiently using 'close_inherited_fds', falling back to the brute-force > approach in 'close_inherited_fds_slow'. Finally applied on top of the ‘posix_spawn’ series as commit 9332b632407894c2e1951cce1bc678f19e1fa8e4. Thanks! Ludo’.