Follow-up from "_v2-entry-point: pass every environment variable"
@denittis wrote:
When inside a Flatpak container the socket fifo FD might be opened multiple times, for example from
flatpak-spawn --host
and frompressure-vessel-launcher
.
@smcv wrote:
This is not ideal. The
--info-fd
protocol is meant to be: you read until EOF.flatpak-spawn
should close all the fds after it has bounced them outside the container, so that it is not holding them open: otherwise, tricks like forwarding a fd that represents a locked resource won't work reliably.We can do this for now, but one of us should send a MR to https://github.com/flatpak/flatpak-xdg-utils to make it close each fd in
fd_list
(except for stdin, stdout, stderr) before entering the main loop.
I think I might have copied the same bug into
-launch
, I'm not sure.
From a quick look it seems that also pressure-vessel-launch
should be affected. I'm currently trying to glue together a small reproducer to be able to confirm the bug and use it as a validator for a possible fix.