From dc59f20d7b65ab3ffd56e298a62f9b0b5b107c6e Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sun, 29 Sep 2024 15:24:54 +0900 Subject: dbus: toggleable xdg-dbus-proxy output Signed-off-by: Ophestra Umiker --- dbus/run.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dbus') diff --git a/dbus/run.go b/dbus/run.go index a4c04dc2..eef0d145 100644 --- a/dbus/run.go +++ b/dbus/run.go @@ -9,7 +9,7 @@ import ( // Start launches the D-Bus proxy and sets up the Wait method. // ready should be buffered and should only be received from once. -func (p *Proxy) Start(ready chan error) error { +func (p *Proxy) Start(ready chan error, output bool) error { p.lock.Lock() defer p.lock.Unlock() @@ -25,8 +25,10 @@ func (p *Proxy) Start(ready chan error) error { // xdg-dbus-proxy does not need to inherit the environment h.Env = []string{} - h.Stdout = os.Stdout - h.Stderr = os.Stderr + if output { + h.Stdout = os.Stdout + h.Stderr = os.Stderr + } if err := h.StartNotify(ready); err != nil { return err } -- cgit v1.3.1