GNU bug report logs -
#78757
shepherd: dangling file descriptor to /dev/console
Previous Next
Reported by: burban <at> opopop.net
Date: Wed, 11 Jun 2025 14:55:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Full log
View this message in rfc822 format
Hello,
All shepherd children have an open file descriptor to /dev/console,
probably because of the use of dup2 (and not dup3) in system.scm.
The pb. disapears if I force that flag with that code before I define
my services (context: shepherd used as init system on Debian):
(port-for-each (lambda (x)
(catch #t
(lambda ()
(when (= (fcntl x F_GETFD) 0)
(fcntl x F_SETFD FD_CLOEXEC)
(format #t "FD_CLOEXEC flag set on port ~a (fd: ~a)\n" x (port->fdes x))))
(lambda (keys . args) (format #t "fcntl error for port ~a\n" x)))
))
Sincerely.
--
Bernard
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.