2 Commits
Author SHA1 Message Date
re:fi.64 35b818b901 run: Write to --instance-id-fd after the pid is written
In commit 21f413f1, flatpak_instance_new was changed to require the pid
file to be written in order to succeed. This causes problems when
calling Spawn with NOTIFY_START, however, because portal expects to be
able to call flatpak_instance_new once the instance ID is retrieved. As
per the comments in the code that writes said instance ID, the idea was
that the instance would be *usable* at the point where the write takes
place (hence it being positioned *after* saving `bwrapinfo.json`), so it
makes sense to now move the write to *after* after the pid file is
written.

Since the pid file write and the instance ID write now go hand-in-hand,
both actions now take place in a separate function, so the logic can be
in one place. Additionally, the write itself is migrated to
`glnx_loop_write`, to shorten the code.

Assisted-by: DeepSeek-V4.1-Flash
2026-10-10 22:43:46 +00:00
re:fi.64 2c3f94f733 tests: Add a new test-spawn for testing spawning via the portal
The only tests for this before were the mocks, which are testing
slightly more specific things.

Assisted-by: DeepSeek-V4.1-Flash
2026-10-10 22:43:46 +00:00