civodul pushed a commit to branch wip-syslogd
in repository shepherd.

commit 23690a337e0a65a7a4715ef4cfd4c4d386089716
Author: Ludovic Courtès <[email protected]>
AuthorDate: Fri Jul 19 13:37:03 2024 +0200

    squash! logger: Make syslog output non-blocking.
---
 modules/shepherd/comm.scm   | 4 ++--
 modules/shepherd/logger.scm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/shepherd/comm.scm b/modules/shepherd/comm.scm
index 88bbb98..0051dbc 100644
--- a/modules/shepherd/comm.scm
+++ b/modules/shepherd/comm.scm
@@ -296,14 +296,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)))))))))
 
diff --git a/modules/shepherd/logger.scm b/modules/shepherd/logger.scm
index ecec8d1..a8f9886 100644
--- a/modules/shepherd/logger.scm
+++ b/modules/shepherd/logger.scm
@@ -29,7 +29,7 @@
                                    service-running-value
                                    service-status)
   #:use-module (shepherd support)
-  #:use-module (rnrs io ports)
+  #:use-module (ice-9 textual-ports)
   #:use-module (ice-9 match)
   #:export (default-log-history-size
 

Reply via email to