taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit f74d304fedd0d10a69b6b82e69d8deb5bec76d8a
parent ebbd5b4724e29635db4ea101f086d2fb71d3eb0b
Author: Florian Dold <florian.dold@gmail.com>
Date:   Wed,  5 Dec 2018 12:51:18 +0100

cleanup

Diffstat:
Mguix/shepherd-with-sock.scm | 20+++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/guix/shepherd-with-sock.scm b/guix/shepherd-with-sock.scm @@ -14,6 +14,16 @@ (define %pid-file-timeout (@@ (shepherd service) %pid-file-timeout)) +(define (clean-up-file file) + (when file + (catch 'system-error + (lambda () + (delete-file file)) + (lambda args + (unless (= ENOENT (system-error-errno args)) + (apply throw args)))))) + + (define (open-service-stdin stdin-socket) (define (get-sock pf af . addr) (let ((sock (socket pf SOCK_STREAM 0))) @@ -21,6 +31,7 @@ (fileno sock))) (match stdin-socket (('unix sockpath) + (clean-up-file sockpath) (get-sock PF_UNIX AF_UNIX sockpath)) (('tcp addr port) (get-sock PF_INET AF_INET (inet-pton AF_INET addr) port)) @@ -163,15 +174,6 @@ its PID." pid))) -(define (clean-up file) - (when file - (catch 'system-error - (lambda () - (delete-file file)) - (lambda args - (unless (= ENOENT (system-error-errno args)) - (apply throw args)))))) - (define make-forkexec-constructor (let ((warn-deprecated-form