From 6156bb1b68443fdb3dcf8321eb8b85e6e384ffbb Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 1 Aug 2011 14:25:19 -0700 Subject: [PATCH] check to see if stderr is writable before using --- scm/lily.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))))) -- 2.39.2