unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#72092: popen creates "/dev/null" fds and never closes them
@ 2024-07-13 12:07 jakub-w
  2024-07-13 18:22 ` bug#72092: [PATCH] fix file descriptor leak in piped_process/system*/popen/etc nathan via Bug reports for GUILE, GNU's Ubiquitous Extension Language
  0 siblings, 1 reply; 2+ messages in thread
From: jakub-w @ 2024-07-13 12:07 UTC (permalink / raw)
  To: 72092

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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-13 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-13 12:07 bug#72092: popen creates "/dev/null" fds and never closes them jakub-w
2024-07-13 18:22 ` bug#72092: [PATCH] fix file descriptor leak in piped_process/system*/popen/etc nathan via Bug reports for GUILE, GNU's Ubiquitous Extension Language

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).