guix-commits
[Top][All Lists]
Advanced

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

[shepherd] 01/02: Make sure that shepherd does not serve already-served


From: Ludovic Courtès
Subject: [shepherd] 01/02: Make sure that shepherd does not serve already-served sockets.
Date: Fri, 16 Jun 2017 04:19:09 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit 649a98a6697d358a53eccc45b387e5130278b5ec
Author: Danny Milosavljevic <address@hidden>
Date:   Wed Jun 14 09:49:02 2017 +0200

    Make sure that shepherd does not serve already-served sockets.
    
    * modules/shepherd.scm (open-server-socket): Remove call to
    'delete-file'.
    * tests/basic.sh: Remove "$socket" before spawning a new 'shepherd'.
    
    Co-authored-by: Ludovic Courtès <address@hidden>
---
 modules/shepherd.scm | 1 -
 tests/basic.sh       | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index dd8a076..f7c169d 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -41,7 +41,6 @@
   (with-fluids ((%default-port-encoding "UTF-8"))
     (let ((sock    (socket PF_UNIX SOCK_STREAM 0))
           (address (make-socket-address AF_UNIX file-name)))
-      (false-if-exception (delete-file file-name))
       (bind sock address)
       (listen sock 10)
       sock)))
diff --git a/tests/basic.sh b/tests/basic.sh
index d9cc67e..1ddb334 100644
--- a/tests/basic.sh
+++ b/tests/basic.sh
@@ -1,5 +1,5 @@
 # GNU Shepherd --- Test basic communication capabilities.
-# Copyright © 2013, 2014, 2016 Ludovic Courtès <address@hidden>
+# Copyright © 2013, 2014, 2016, 2017 Ludovic Courtès <address@hidden>
 # Copyright © 2016 Mathieu Lirzin <address@hidden>
 # Copyright © 2014 Alex Sassmannshausen <address@hidden>
 #
@@ -216,7 +216,7 @@ test -f "$log"
 export XDG_CONFIG_HOME=$confdir
 mkdir -p $confdir/shepherd
 mv $conf $confdir/shepherd/init.scm
-rm -f "$pid"
+rm -f "$pid" "$socket"
 shepherd -I -s "$socket" --pid="$pid" &
 
 # Wait till it's ready.



reply via email to

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