guix-commits
[Top][All Lists]
Advanced

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

[shepherd] 02/08: comm: ‘call-with-syslog-port’ opens /dev/{kmsg,console


From: Ludovic Courtès
Subject: [shepherd] 02/08: comm: ‘call-with-syslog-port’ opens /dev/{kmsg,console} non-blocking.
Date: Mon, 5 Aug 2024 13:15:05 -0400 (EDT)

civodul pushed a commit to branch devel
in repository shepherd.

commit ac1078a30e4c1b43d32922cc42a27fb4b92dd586
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Aug 5 18:59:14 2024 +0200

    comm: ‘call-with-syslog-port’ opens /dev/{kmsg,console} non-blocking.
    
    * modules/shepherd/comm.scm (call-with-syslog-port): Pass PORT through
    ‘non-blocking-port’.
---
 modules/shepherd/comm.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/shepherd/comm.scm b/modules/shepherd/comm.scm
index 59e0adb..2320e30 100644
--- a/modules/shepherd/comm.scm
+++ b/modules/shepherd/comm.scm
@@ -297,14 +297,14 @@ mechanism."
                         (call-with-output-file "/dev/kmsg"
                           (lambda (port)
                             (setvbuf port 'block)
-                            (proc port))))
+                            (proc (non-blocking-port port)))))
                       (lambda args
                         (if (memv (system-error-errno args)
                                   (list ENOENT EACCES EPERM))
                             (call-with-output-file "/dev/console"
                               (lambda (port)
                                 (setvbuf port 'none)
-                                (proc port)))
+                                (proc (non-blocking-port port))))
                             (apply throw args))))
                     (apply throw args)))))))))
 



reply via email to

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