simon-git: bob (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Mar 4 12:29:47 GMT 2024
TL;DR:
fe59e98 Rework Podman fifo system to use an AF_UNIX socket.
Repository: https://git.tartarus.org/simon/bob.git
On the web: https://git.tartarus.org/?p=simon/bob.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2024-03-04 12:29:47
commit fe59e98184e582c6ab950ca1925f572a067c6789
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=fe59e98184e582c6ab950ca1925f572a067c6789;hp=0ca26a540a03394fecc33277d762dc8322790641
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Mar 4 12:26:02 2024 +0000
Rework Podman fifo system to use an AF_UNIX socket.
This replaces the complicated dance I did in the previous commit to
avoid blocking on pipe opens. Now I make a listening Unix socket in
the shared piece of filesystem, and bob-delegate-server connects to
it. So I can select() on the socket accept operation while also
watching to see if the Podman child process dies before completing the
connection.
It's still a bit awkward, because 'watching to see if the Podman child
process dies' is itself a thing that needs some faff, because pids
aren't file descriptors you can select on (unless I want to commit
only to Linux-with-pidfd _and_ figure out how to do that in Python).
So I have a subthread whose job is to wait() for the subprocess, and
close its end of a pipe if it terminates, and then I can select on
that pipe along with the listening Unix socket.
But it's still less horrible than the previous code, and I've checked
that it still works with all the delegates in a Puzzles build
(self-delegation, arbitrary-subprocess delegation, Podman) and also
detects an error if Podman can't start.
bob-delegate-server | 15 +++++-----
execute.py | 81 ++++++++++++++++++++++++++++++-----------------------
misc.py | 11 --------
3 files changed, 53 insertions(+), 54 deletions(-)
More information about the tartarus-commits
mailing list