Subject: bug#34407: closed (Re: bug#34407: [PATCH] shepherd: Delete the socket file upon exit.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 08 Apr 2019 09:00:03 +0000

Your bug report

#34407: Shepherd won't close socket on exit

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
34407: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34407
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#34407: [PATCH] shepherd: Delete the socket file upon exit.
From: Ludovic Courtès <[email-masked]>
To: [email-masked] (宋文武)
Cc: [email-masked], [email-masked]
Date: Mon, 08 Apr 2019 10:58:57 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

[email-masked] (宋文武) skribis:

> Yes, I have the 'rm /run/user/1000/shepherd/socket' workaround in my session
> script too...

I never had to do that because /run is wiped at boot time, like Danny
wrote.

> According to 'man 2 bind', the socket pathname should be deleted when no
> longer required, so a patch to fix this bug:
>
> From f171f6adb2fc6ee3bf4d25378c2e7bba109b43d8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <[email-masked]>
> Date: Sun, 17 Feb 2019 11:27:28 +0800
> Subject: [PATCH] shepherd: Delete the socket file upon exit.
>
> Fixes <https://bugs.gnu.org/34407>.
>
> * modules/shepherd.scm (call-with-server-socket): New procedure.
> (main): Use it instead of 'open-server-socket'.

Pushed, thanks!

Ludo’.

Subject: Shepherd won't close socket on exit
From: nly <[email-masked]>
To: [email-masked]
Date: Sun, 10 Feb 2019 01:26:55 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

Shepherd does not close the socket when exiting with `herd stop root`.
"bind: Address already in use"

~$ rm /run/user/1000/shepherd/socket
~$ shepherd
Service root has been started.
~$ herd status
error: connect: /run/user/1000/shepherd/socket: Connection refused
~$ shepherd
Service root has been started.
~$ Backtrace:
           3 (primitive-load "/run/current-system/profile/bin/shepherd")
In shepherd.scm:
   250:24  2 (main . _)
     48:6  1 (open-server-socket _)
In unknown file:
           0 (bind #<input-output: socket 13> #(1 "/run/user/1000/shepherd/socket") #)

ERROR: In procedure bind:
In procedure bind: Address already in use
  C-c C-c
~$