diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 8697d9d16d..352e736050 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -369,9 +369,11 @@ (define (activate-ptrace-attach) processes--see Yama.txt in the Linux source tree for the rationale. This sounds like an unacceptable restriction for little or no security improvement." - (call-with-output-file "/proc/sys/kernel/yama/ptrace_scope" - (lambda (port) - (display 0 port)))) + (let ((file "/proc/sys/kernel/yama/ptrace_scope")) + (when (file-exists? file) + (call-with-output-file file + (lambda (port) + (display 0 port)))))) (define %current-system