From: Paul Holzinger <pholzing@redhat.com>
To: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>, passt-dev@passt.top
Subject: Re: Startup fd to avoid busywaits
Date: Wed, 27 May 2026 21:39:02 +0200 [thread overview]
Message-ID: <cbe5ab63-3266-4234-8745-5a6583039809@redhat.com> (raw)
In-Reply-To: <CAC-VXLYqvXu+yHsM=DUt-7MSGp_+o8Wt5zgGYzi1gdNvtoRK-A@mail.gmail.com>
Hi,
On 27/05/2026 19:08, Lisanna Dettwyler wrote:
> Hello! I would like to propose a patch that allows the invoker to pass
> a "ready fd" on startup that gets written to once the setup has been
> completed, similar to slirp4netns's `--ready-fd` flag. Currently we
> have to poll the interface in a loop to wait for setup to be
> completed, and it would be much better if we could instead block on fd
> activity.
>
> Just wanted to check if such a contribution would be welcome before
> putting in the work of authoring it, or if there's already a better
> way to wait for the interface to come up. This is our current
> implementation:
> https://github.com/NixOS/nix/pull/15919/changes#diff-2a9176262efad1ef345d882b0779646e7a5aaf9ca8db33e9da7fc408594b5377R94-R125
>
I am not a pasta maintainer but this is rather simple as we do it in
podman. By default pasta forks into the background, when the parent
exists the child is ready for connections. So all you need to do is
fork/exec and then wait for the exit, that way you also get easily the
exit code to know if the setup failed and can read the stderr for errors.
From your linked code I see the use of --foreground so the question
would be why are you using this over the default?
--
Paul Holzinger
next prev parent reply other threads:[~2026-05-27 19:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 17:08 Lisanna Dettwyler
2026-05-27 19:39 ` Paul Holzinger [this message]
2026-05-27 19:39 ` Stefano Brivio
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=cbe5ab63-3266-4234-8745-5a6583039809@redhat.com \
--to=pholzing@redhat.com \
--cc=lisanna.dettwyler@gmail.com \
--cc=passt-dev@passt.top \
/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).