public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/6] Fix bug 215 and some related issues with fd handling
Date: Tue, 14 Jul 2026 19:29:20 +1000	[thread overview]
Message-ID: <20260714092926.2881848-1-david@gibson.dropbear.id.au> (raw)

Stefano, you called it correctly.  While working on bug 215, as usual,
I found a bunch of adjacent things to clean up.

I did start by attempting the appoach you suggested for bug 215 -
remembering which of the low fds were standard streams and avoiding
closing them in __daemon().  It is indeed shorter, but only by 1-2
lines.  Looking at possible interactions with other things, I became
more and more convinced that leaving anything other than the standard
streams in fds 0-2 was an accident waiting to happen.  Much of the
rest of the series is, for example, dealing with the possibility of
--fd [012].

David Gibson (6):
  isolation, util: Fold close_open_files() into isolate_initial()
  isolation, conf: Set c->fd_tap from eary parse of --fd
  conf: Make conf_tap_fd() operate more like conf_mode()
  isolation: Move --fd descriptor to a number of our choosing
  main: Ensure fds 0-2 are populated
  passt: *Always* close pidfile_fd, not just when daemonizing

 conf.c      | 31 +++++++++++++++++++++++--------
 conf.h      |  2 +-
 isolation.c | 32 ++++++++++++++++++++++++++++++--
 isolation.h |  2 +-
 passt.c     | 27 +++++++++++++++++----------
 util.c      | 52 +---------------------------------------------------
 util.h      |  1 -
 7 files changed, 73 insertions(+), 74 deletions(-)

-- 
2.55.0


             reply	other threads:[~2026-07-14  9:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  9:29 David Gibson [this message]
2026-07-14  9:29 ` [PATCH 1/6] isolation, util: Fold close_open_files() into isolate_initial() David Gibson
2026-07-15  7:12   ` Stefano Brivio
2026-07-14  9:29 ` [PATCH 2/6] isolation, conf: Set c->fd_tap from eary parse of --fd David Gibson
2026-07-15  7:12   ` Stefano Brivio
2026-07-14  9:29 ` [PATCH 3/6] conf: Make conf_tap_fd() operate more like conf_mode() David Gibson
2026-07-14  9:29 ` [PATCH 4/6] isolation: Move --fd descriptor to a number of our choosing David Gibson
2026-07-14  9:29 ` [PATCH 5/6] main: Ensure fds 0-2 are populated David Gibson
2026-07-14  9:29 ` [PATCH 6/6] passt: *Always* close pidfile_fd, not just when daemonizing David Gibson

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

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

  git send-email \
    --in-reply-to=20260714092926.2881848-1-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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://passt.top/passt

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 IMAP folder(s).