emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#69269: closed ([PATCH] gnu: web: fcgiwrap: remove UNIX socket when s


From: GNU bug Tracking System
Subject: bug#69269: closed ([PATCH] gnu: web: fcgiwrap: remove UNIX socket when service stopped.)
Date: Wed, 13 Mar 2024 13:07:03 +0000

Your message dated Wed, 13 Mar 2024 13:05:38 +0000
with message-id <87h6hauvr2.fsf@cbaines.net>
and subject line Re: [bug#69269] [PATCH v3] gnu: fcgiwrap: Update to 
1.1.0-1.2870d27, switch to a fork.
has caused the debbugs.gnu.org bug report #69269,
regarding [PATCH] gnu: web: fcgiwrap: remove UNIX socket when service stopped.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
69269: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69269
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: web: fcgiwrap: remove UNIX socket when service stopped. Date: Mon, 19 Feb 2024 10:53:24 +0000 User-agent: Evolution 3.46.4
The generic kill destructor is used to terminate the process, but if it was
configured to use a UNIX socket, that socket gets left behind.  Subsequent
attempts to re-start the service then fail with a 'socket in use' error.  So
we perform extra duty in the stop action to clean up if necessary.

* gnu/services/web.scm: new logic in fcgiwrap-shepherd-service.
---
 gnu/services/web.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 05fd71f9949..877e15342b0 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -907,7 +907,14 @@ (define fcgiwrap-shepherd-service
                         "-s" #$socket)
                       #:user #$user #:group #$group
                       #:log-file "/var/log/fcgiwrap.log"))
-            (stop #~(make-kill-destructor)))))))
+            (stop #~(let ((mkd (make-kill-destructor)))
+                      (lambda x
+                        (apply mkd x)
+                        (when (string-prefix? "unix:" #$socket)
+                          (let ((socket (substring #$socket 5)))
+                            (when (access? socket F_OK)
+                              (delete-file socket))))
+                        #f))))))))
 
 (define fcgiwrap-activation
   (match-lambda
-- 
2.41.0


--- End Message ---
--- Begin Message --- Subject: Re: [bug#69269] [PATCH v3] gnu: fcgiwrap: Update to 1.1.0-1.2870d27, switch to a fork. Date: Wed, 13 Mar 2024 13:05:38 +0000 User-agent: mu4e 1.10.8; emacs 29.1
Dale Mellor <guix-devel-0brg6b@rdmp.org> writes:

> From: 宋文武 <iyzsong@member.fsf.org>
>
> * gnu/packages/web.scm (fcgiwrap): Update to 1.1.0-1.2870d27.
> [source]: Switch to https://github.com/flu0r1ne/fcgiwrap.
>
> Dale Mellor:
>    - This looks good to me
>
>    - Checked the change in the delta and the forked repository, both are
>      simple and clean
>
>    - The functionality works as advertised, and fixes the original problem
>      that 'herd restart fcgiwrap' now works properly
>
> Reviewed-by: Dale Mellor <guix-devel-0brg6b@rdmp.org>
>
> Change-Id: Ia9e7b911a0c8bde50924e3398f915f945cf955a6
> ---
>  gnu/packages/web.scm | 68 +++++++++++++++++++++++---------------------
>  1 file changed, 36 insertions(+), 32 deletions(-)

Thanks both, I've pushed this to master as
7b5c030684020282a690322b558f86718eb148a7.

Chris

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

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