]> git.donarmstrong.com Git - lilypond.git/commitdiff
check to see if stderr is writable before using
authorDon Armstrong <don@donarmstrong.com>
Mon, 1 Aug 2011 21:25:19 +0000 (14:25 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 1 Aug 2011 21:25:19 +0000 (14:25 -0700)
scm/lily.scm

index 203a449c8f00f1e9d9c7108cb7a8cd045077777f..97170aa2774e73fb38bfb45432e49b980e6fb4ae 100644 (file)
@@ -814,7 +814,9 @@ PIDs or the number of the process."
          (if separate-logs
              (open-file (if (string-or-symbol? (ly:get-option 'log-file))
                             (format "~a.log" (ly:get-option 'log-file))
-                            "/dev/stderr") "a") #f))
+                            (if (access? "/dev/stderr" W_OK)
+                                "/dev/stderr"
+                                "/dev/null")) "a") #f))
         (do-measurements (ly:get-option 'dump-profile))
         (handler (lambda (key failed-file)
                    (set! failed (append (list failed-file) failed)))))