GNU bug report logs - #72092
popen creates "/dev/null" fds and never closes them

Previous Next

Package: guile;

Reported by: jakub-w <at> riseup.net

Date: Sat, 13 Jul 2024 12:09:02 UTC

Severity: important

Full log


View this message in rfc822 format

From: jakub-w <at> riseup.net
To: 72092 <at> debbugs.gnu.org
Subject: bug#72092: popen creates "/dev/null" fds and never closes them
Date: Sat, 13 Jul 2024 12:07:52 +0000
Consider the following example:

(use-modules (ice-9 popen))

(parameterize ((current-error-port (%make-void-port OPEN_BOTH)))
  (while #t
    (close-pipe (open-pipe* OPEN_READ "free"))
    (sleep 1)))

This opens a new "/dev/null" file descriptor every second and doesn't
close it when close-pipe is called.
If current ports are all fd ports, this doesn't happen.

AFAICT the problem was introduced by the commit
36fd2b4920ae926c79b936c29e739e71a6dff2bc in Guile 3.0.10.




This bug report was last modified 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.