Commit Graph

10 Commits

Author SHA1 Message Date
Ophestra Umiker 9647eb6a6b
helper: separate pipes from Helper
Upcoming bwrap helper implementation requires two sets of pipes to be managed, fd will also no longer be constant.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07 12:48:20 +09:00
Ophestra Umiker 18d9ce733e
helper: test non-existent helpers
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-06 16:00:59 +09:00
Ophestra Umiker 7e7327ebf8
helper: export internal stub functions for cross-package testing
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29 15:22:35 +09:00
Ophestra Umiker 3bf456da65
helper: test child process handling
The stub child process simulates reading from the argument fd and copies the entire payload unmodified to stdout. If status pipe is enabled it will simulate sync fd behaviour as well.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29 14:59:39 +09:00
Ophestra Umiker 61ba841c88
helper: remove unreachable check
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29 14:48:38 +09:00
Ophestra Umiker d530a9e9f9
helper: stub helper for tests
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29 14:40:01 +09:00
Ophestra Umiker 8492239cba
helper/args: simplify argument parsing and eliminate excess memory copies
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-25 14:00:30 +09:00
Ophestra Umiker 97bab6c406
helper: clean up and separate helper process management from dbus
The previous code was poorly documented and made little sense in some parts. This is a generalised and cleaned up implementation in the helper package making use of the Args interface.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-25 01:16:06 +09:00
Ophestra Umiker 831b1aad6f
helper/args: hold a read lock in WriteTo
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-24 20:22:37 +09:00
Ophestra Umiker 000607da5f
helper: separate helper args fd builder from dbus
This method of passing arguments is used in bubblewrap as well as other tools, this commit separates the argument builder/writer to the helper package and generalise it as an interface.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-24 16:11:08 +09:00