lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix: file descriptor leak in scm/framework-eps.scm


From: Matthias Kilian
Subject: Re: Fix: file descriptor leak in scm/framework-eps.scm
Date: Tue, 14 Nov 2006 23:54:23 +0100
User-agent: Mutt/1.4.2.2i

On Mon, Nov 13, 2006 at 11:48:18PM +0100, Matthias Kilian wrote:
> Found when trying to build on OpenBSD:

Fix another fd leak. To reproduce those leaks on Linux, try
ulimit -n 128 (or even 64) before running make all web.

BTW: this all is about LilyPond 2.10.0.


--- scm/backend-library.scm.orig        Fri Nov 10 14:44:26 2006
+++ scm/backend-library.scm     Tue Nov 14 22:02:42 2006
@@ -158,7 +158,9 @@
              (if (equal? "-" file-name) "<stdout>" file-name))
   (if (equal? file-name "-")
       (display value)
-      (display value (open-file file-name "w")))
+      (let ((port (open-file file-name "w")))
+         (display value port)
+         (close-port port)))
   (ly:progress "\n")
   "")
 
Ciao,
        Kili

ps: anyone using OpenBSD who wants to help please contact me offlist;
you'll need some patches not yet committed to the OpenBSD trees
(especially for makeinfo and guile, but also for LilyPond itself).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]