unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 55223-done@debbugs.gnu.org
Subject: bug#55223: Shepherd 0.9.0 ‘make-inetd-constructor’ can leak file descriptors
Date: Mon, 02 May 2022 23:11:45 +0200	[thread overview]
Message-ID: <87h767r65q.fsf@gnu.org> (raw)
In-Reply-To: <87fslsrnqi.fsf@inria.fr> ("Ludovic Courtès"'s message of "Mon, 02 May 2022 16:52:05 +0200")

Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

> ‘make-inetd-constructor’ creates a socket and then calls bind(2) on it.
>
>   (lambda args
>     (let ((sock  (non-blocking-port
>                   (socket (sockaddr:fam address) socket-style 0)))
>           […])
>       (setsockopt sock SOL_SOCKET SO_REUSEADDR 1)
>       […]
>       (bind sock address)
>
> If bind(2) fails, for instance with EADDRINUSE, the socket it created is
> leaked; it will be closed “eventually”, when GC runs, but that could
> happen much later.

Fixed in Shepherd commit b4a30a309f0e9451a671691b19fa7a5e1ef92b69.

Ludo’.




      reply	other threads:[~2022-05-02 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 14:52 bug#55223: Shepherd 0.9.0 ‘make-inetd-constructor’ can leak file descriptors Ludovic Courtès
2022-05-02 21:11 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h767r65q.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=55223-done@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).