bug-lilypond
[Top][All Lists]
Advanced

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

Re: error with -dseparate-log-files


From: David Kastrup
Subject: Re: error with -dseparate-log-files
Date: Mon, 20 Aug 2012 11:55:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

"Phil Holmes" <address@hidden> writes:

> Definite bug for windows.  Don't believe dev/stderr should be used here:
>
>              (open-file (if (string-or-symbol? (ly:get-option 'log-file))
>                             (format #f "~a.log" (ly:get-option 'log-file))
>                     "/dev/stderr") "a") #f))
>
>
> David will know, but I suspect current-error-port or somesuch should
> be used.

My personal guess would be something like

diff --git a/scm/lily.scm b/scm/lily.scm
index 070ba75..8b63bc8 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -810,10 +810,11 @@ PIDs or the number of the process."
   (let* ((failed '())
          (separate-logs (ly:get-option 'separate-log-files))
          (ping-log
-          (if separate-logs
-              (open-file (if (string-or-symbol? (ly:get-option 'log-file))
-                             (format #f "~a.log" (ly:get-option 'log-file))
-                     "/dev/stderr") "a") #f))
+          (and separate-logs
+               (if (string-or-symbol? (ly:get-option 'log-file))
+                   (open-file (format #f "~a.log" (ly:get-option 'log-file))
+                              "a")
+                   (current-error-port))))
          (do-measurements (ly:get-option 'dump-profile))
          (handler (lambda (key failed-file)
                     (set! failed (append (list failed-file) failed)))))
However, LilyPond plays stupid games with redirecting the error port
with ly:stderr-redirect rather close to system level, and I don't know
whether there is a feasible way to get it back (or whether this is
actually required) short of opening /dev/stderr or equivalent.

-- 
David Kastrup

reply via email to

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