From a8b4b3634b8bef6040601d970a7c178da72b114d Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Wed, 25 Sep 2024 01:17:38 +0900 Subject: dbus: use generalised helper.Helper for xdg-dbus-proxy Signed-off-by: Ophestra Umiker --- dbus/dbus.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'dbus/dbus.go') diff --git a/dbus/dbus.go b/dbus/dbus.go index 9c99a703..d68dcfa1 100644 --- a/dbus/dbus.go +++ b/dbus/dbus.go @@ -4,8 +4,6 @@ import ( "errors" "fmt" "io" - "os" - "os/exec" "sync" "git.ophivana.moe/cat/fortify/helper" @@ -14,19 +12,12 @@ import ( // Proxy holds references to a xdg-dbus-proxy process, and should never be copied. // Once sealed, configuration changes will no longer be possible and attempting to do so will result in a panic. type Proxy struct { - cmd *exec.Cmd - - statP [2]*os.File - argsP [2]*os.File + helper *helper.Helper path string session [2]string system [2]string - wait *chan error - read *chan error - ready *chan bool - seal io.WriterTo lock sync.RWMutex } @@ -39,8 +30,8 @@ func (p *Proxy) String() string { p.lock.RLock() defer p.lock.RUnlock() - if p.cmd != nil { - return p.cmd.String() + if p.helper != nil { + return p.helper.String() } if p.seal != nil { -- cgit v1.3.1