guix-commits
[Top][All Lists]
Advanced

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

[shepherd] 23/32: shepherd: Remove half-baked readline support.


From: Ludovic Courtès
Subject: [shepherd] 23/32: shepherd: Remove half-baked readline support.
Date: Wed, 30 Mar 2022 11:01:32 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit 41b9bf9e1a8e6bb41c2865c6778d7c6370f9674d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 28 15:50:15 2022 +0200

    shepherd: Remove half-baked readline support.
    
    * modules/shepherd.scm (main): Remove call to 'activate-readline'.
    (run-daemon): Remove initial 'handle-SIGCHLD' call.
---
 modules/shepherd.scm | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index febbfef..9fec3fb 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -24,7 +24,6 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (ice-9 rdelim)   ;; Line-based I/O.
-  #:autoload   (ice-9 readline) (activate-readline) ;for interactive use
   #:use-module ((ice-9 threads) #:select (all-threads))
   #:use-module (oop goops)      ;; Defining classes and methods.
   #:use-module (srfi srfi-1)    ;; List library.
@@ -181,11 +180,6 @@ already ~a threads running, disabling 'signalfd' support")
            (#t (display (getpid)))
            (_  #t))
 
-         ;; XXX: This call mostly to resolve 'handle-SIGCHLD' upfront.
-         ;; This works around Guile 3.0.2 occasionally failing with:
-         ;; "Failed to autoload handle-SIGCHLD in (ice-9 readline):"
-         (handle-SIGCHLD)
-
          ;; Spawn a signal handling fiber.
          (spawn-fiber
           (if signal-port
@@ -317,20 +311,8 @@ already ~a threads running, disabling 'signalfd' support")
                    (l10n "get commands from socket FILE or from stdin (-)")
                    #:action (lambda (file)
                               (set! socket-file
-                                    (if (not (string=? file "-"))
-                                        file
-                                      ;; We will read commands
-                                      ;; from stdin, thus we
-                                      ;; enable readline if it is
-                                      ;; a non-dumb terminal.
-                                      (and (isatty? (current-input-port))
-                                           (not (string=? (getenv "TERM")
-                                                          "dumb"))
-                                           (begin
-                                             (activate-readline)
-                                             ;; Finally, indicate that
-                                             ;; we use no socket.
-                                             #f)))))))
+                                    (and (not (string=? file "-"))
+                                         file)))))
     ;; We do this early so that we can abort early if necessary.
     (and socket-file
          (verify-dir (dirname socket-file) #:secure? secure))



reply via email to

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