[bug#65221,0/2] Fix EXTRA-PORTS edge cases

Message ID 20230811090352.3572-1-striness@tilde.club
Headers
Series Fix EXTRA-PORTS edge cases |

Message

ulfvonbelow Aug. 11, 2023, 9:03 a.m. UTC
The #:extra-ports argument to exec-command and its users behaves quite
strangely in certain circumstances, for example when multiple ports are
supplied, and they are supplied in an order other than by ascending file
descriptor number.  This can cause file descriptors to be clobbered.

ulfvonbelow (2):
  service: make EXTRA-PORTS work as advertised.
  service: use PRESERVE-PORTS for redirecting FDs 0-2.

 modules/shepherd/service.scm | 119 ++++++++++++++++++++++-------------
 1 file changed, 76 insertions(+), 43 deletions(-)