From: Don Armstrong Date: Mon, 1 Aug 2011 21:25:19 +0000 (-0700) Subject: check to see if stderr is writable before using X-Git-Tag: debian/2.16.0-1_exp+1~53 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=6156bb1b68443fdb3dcf8321eb8b85e6e384ffbb;p=lilypond.git check to see if stderr is writable before using --- diff --git a/scm/lily.scm b/scm/lily.scm index 203a449c8f..97170aa277 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -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)))))