[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/08: services: dhcp-client: Use 'read-pid-file'.
From: |
Ludovic Courtès |
Subject: |
04/08: services: dhcp-client: Use 'read-pid-file'. |
Date: |
Wed, 26 Sep 2018 17:40:46 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 6f03b08089167ec863361352ab200830bffeb0b7
Author: Ludovic Courtès <address@hidden>
Date: Wed Sep 26 22:30:16 2018 +0200
services: dhcp-client: Use 'read-pid-file'.
* gnu/services/networking.scm (dhcp-client-service-type)[start]: Use
'read-pid-file' instead of the custom and possibly infinite loop.
---
gnu/services/networking.scm | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index bd1d5a2..3fdb2bb 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès
<address@hidden>
;;; Copyright © 2015 Mark H Weaver <address@hidden>
;;; Copyright © 2016, 2018 Efraim Flashner <address@hidden>
;;; Copyright © 2016 John Darrington <address@hidden>
@@ -191,19 +191,7 @@ fe80::1%lo0 apps.facebook.com\n")
(cons* #$dhclient "-nw"
"-pf" #$pid-file ifaces))))
(and (zero? (cdr (waitpid pid)))
- (let loop ()
- (catch 'system-error
- (lambda ()
- (call-with-input-file #$pid-file read))
- (lambda args
- ;; 'dhclient' returned before PID-FILE was
created,
- ;; so try again.
- (let ((errno (system-error-errno args)))
- (if (= ENOENT errno)
- (begin
- (sleep 1)
- (loop))
- (apply throw args))))))))))
+ (read-pid-file #$pid-file)))))
(stop #~(make-kill-destructor))))))
(define* (dhcp-client-service #:key (dhcp isc-dhcp))
- branch master updated (0661912 -> e15ede6), Ludovic Courtès, 2018/09/26
- 01/08: gnu: shepherd: Update to 0.5.0., Ludovic Courtès, 2018/09/26
- 04/08: services: dhcp-client: Use 'read-pid-file'.,
Ludovic Courtès <=
- 06/08: services: udev: Don't attempt to read "modules.devname" from a container., Ludovic Courtès, 2018/09/26
- 02/08: guix system: Load all services on reconfigure, not just stopped ones., Ludovic Courtès, 2018/09/26
- 08/08: gnu: enlightenment: Fix initial locale and keyboard selection., Ludovic Courtès, 2018/09/26
- 03/08: gnu: Remove incorrect Emacs package deprecations., Ludovic Courtès, 2018/09/26
- 05/08: services: shepherd: Add workaround for 0.5.0 in containers., Ludovic Courtès, 2018/09/26
- 07/08: services: virtual-terminal: Write to "default_utf8" only if necessary., Ludovic Courtès, 2018/09/26