diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2020-12-09 18:28:03 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2020-12-09 18:33:34 +0100 |
commit | 647d28bf9b8da2ce47a888aad71ab5264eea6c6d (patch) | |
tree | f0d87dc8f65f27a8c84a6b13eed75d925888c6e7 | |
parent | 51369e3955cdc5bf3f1ba0f6e2d7c4d73406c111 (diff) |
lacme: delay webserver socket shutdown.
To after the process has terminated. This solves a race condition
spewing
accept: Invalid argument at /usr/libexec/lacme/webserver line 80.
(harmless) errors.
Closes: deb#970458
-rw-r--r-- | Changelog | 7 | ||||
-rwxr-xr-x | lacme | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,10 @@ +lacme (0.7.1) upstream; + + - lacme: delay webserver socket shutdown to after the process has + terminated. + + -- Guilhem Moulin <guilhem@fripost.org> Wed, 09 Dec 2020 18:23:22 +0100 + lacme (0.7) upstream; * Breaking change: the certificate indicated by 'CAfile' is no longer @@ -346,9 +346,9 @@ sub spawn_webserver() { set_FD_CLOEXEC($sock, 1); push @CLEANUP, sub() { print STDERR "[$$] Shutting down ACME webserver bound to $p\n" if $OPTS{debug}; - shutdown($sock, SHUT_RDWR) or warn "shutdown: $!"; kill 15 => $pid; waitpid $pid => 0; + shutdown($sock, SHUT_RDWR) or warn "shutdown: $!"; }; # on dual-stack ipv4/ipv6, we'll need to open the port for the |