aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-08 06:35:36 +0900
committerOphestra <cat@gensokyo.uk>2025-12-08 07:21:04 +0900
commit357cfcddeea14d6babacf7ae8f77e0bad7b24ee5 (patch)
treeeaad515e98541dd3e3f6d0bdfc5f54d360463f48 /container/dispatcher.go
parent6bf245cf1b8d5e30c051bb6295533d287cb4eda6 (diff)
container: start daemons within container
This is useful for daemons internal to the container. The only current use case is pipewire-pulse. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher.go')
-rw-r--r--container/dispatcher.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/container/dispatcher.go b/container/dispatcher.go
index e1dae6eb..e58346e8 100644
--- a/container/dispatcher.go
+++ b/container/dispatcher.go
@@ -68,6 +68,8 @@ type syscallDispatcher interface {
notify(c chan<- os.Signal, sig ...os.Signal)
// start starts [os/exec.Cmd].
start(c *exec.Cmd) error
+ // wait waits on [os/exec.Cmd].
+ wait(c *exec.Cmd) error
// signal signals the underlying process of [os/exec.Cmd].
signal(c *exec.Cmd, sig os.Signal) error
// evalSymlinks provides [filepath.EvalSymlinks].
@@ -170,6 +172,7 @@ func (direct) seccompLoad(rules []std.NativeRule, flags seccomp.ExportFlag) erro
}
func (direct) notify(c chan<- os.Signal, sig ...os.Signal) { signal.Notify(c, sig...) }
func (direct) start(c *exec.Cmd) error { return c.Start() }
+func (direct) wait(c *exec.Cmd) error { return c.Wait() }
func (direct) signal(c *exec.Cmd, sig os.Signal) error { return c.Process.Signal(sig) }
func (direct) evalSymlinks(path string) (string, error) { return filepath.EvalSymlinks(path) }