Commit graph

13 commits

Author SHA1 Message Date
Vicki Pfau
66a9008d84 process: Improve signal handling, don't wait for process in exit_code 2024-05-08 16:39:14 -07:00
Jeremy Whiting
88ce0ee123 Change a bit to have separate SubProcess vs ProcessManager.
Keep next_process, connection, etc. in ProcessManager instead
of SteamOSManager.
Also change exit_code to only give the exit code if known.
Added wait to do the wait and get the proper
exit code on completion.
Also added libc::pid_t use in process.rs.
2024-05-06 14:44:13 -06:00
Jeremy Whiting
cf1bf84d30 ProcessManager: Add some tests for various ProcessManager functions.
Keep track of whether we paused or resumed processes.
Don't try to wait for a paused process when exit_code() is called.
Make sure pause/resume work as expected, and error when expected.
2024-05-06 14:43:34 -06:00
Jeremy Whiting
c49426f6af ProcessManager: Add a ProcessManager so we can cancel/pause/resume.
In order to be able to pause/resume/cancel some operations
that could take some time we need to keep track of those processes
and give callers an id to pause/resume/cancel them with later.

In these long running cases, return an object path that can be used
to pause/resume/cancel when told to.

TODO:
- Add some tests and manually test that the right things happen
2024-05-06 14:43:32 -06:00
Vicki Pfau
0142f1199f process: Fix test warnings 2024-04-05 15:01:31 -07:00
Vicki Pfau
7e16f2978f process: Fix testing setup 2024-04-04 20:01:59 -07:00
Vicki Pfau
cf962b26c5 Fix test build warnings 2024-04-04 18:38:39 -07:00
Vicki Pfau
cb04cd2cf4 manager: Improve error logging 2024-04-04 18:08:21 -07:00
Vicki Pfau
c37bd22db0 process: Use a callback instead of real subprocess in tests 2024-04-04 18:08:21 -07:00
Vicki Pfau
853ce3dd84 systemd: Add new module for interacting with systemd 2024-04-04 18:08:21 -07:00
Vicki Pfau
8ae6c98554 process: Make API less fiddly 2024-04-04 18:08:13 -07:00
Vicki Pfau
309f2acc1b wifi: Split out from manager 2024-04-02 18:20:09 -07:00
Vicki Pfau
0d90859841 process: Split out from manager 2024-04-02 18:20:09 -07:00