Subject: Shepherd won't close socket on exit

From: nly <[email-masked]>
Date: Sun, 10 Feb 2019 01:26:55 +0530

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
~$