Closed janderholm closed 1 year ago
@janderholm Would you mind to rebase onto master
to bring in fixes to the pipeline to make the checks pass here?
Yes! I will continue looking into it over the weekend.
Oh no! I accidentally pushed the wrong branch and this closed the pull request!
I believe I have addressed your comments and think I managed to restore the pull request.
I managed to cobble something together. It works similarly to the connected_to_journal
test except that it simply includes examples/persistent_state.rs
, run that and check the exit code.
It seems to work, but I'm a bit unsure of the arguments to systemd-run. For example I don't understand --collect
.
I had to change the example doc comment to a regular comment because it was not possible to include!(...)
it otherwise. But since it's an example it doesn't normally show up in the docs anyway.
For example I don't understand --collect.
systemd-run
does create an ephemeral unit/scope to actually run the binary.
The --collect
option is meant to clean up all such transient content (i.e. perform "garbage collection") upon exit.
This is required for proper use of FDSTORE.
There's also a small example which uses FDSTORE to maintain some state which are persistent over restarts of various kinds.