diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-25 00:57:35 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-25 00:57:35 +0900 |
| commit | 65094b63cddb4357ed05133aa6377355edc3b587 (patch) | |
| tree | cec84e738d4efea22ff21eaf57e1a4d8d2aebcc7 /system | |
| parent | f0a082ec84172f5b3f001bcc757bade06feb0457 (diff) | |
system/dbus: filter context cancellation error
This message would otherwise show up when alternative exit path is taken due to a signal.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system')
| -rw-r--r-- | system/dbus.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/system/dbus.go b/system/dbus.go index cbb127ed..5f62b2e4 100644 --- a/system/dbus.go +++ b/system/dbus.go @@ -2,6 +2,7 @@ package system import ( "bytes" + "context" "errors" "log" "strings" @@ -96,7 +97,12 @@ func (d *DBus) revert(sys *I, _ *Criteria) error { sys.println("terminating message bus proxy") d.proxy.Close() defer sys.println("message bus proxy exit") - return sys.wrapErrSuffix(d.proxy.Wait(), "message bus proxy error:") + err := d.proxy.Wait() + if errors.Is(err, context.Canceled) { + sys.println("message bus proxy canceled upstream") + err = nil + } + return sys.wrapErrSuffix(err, "message bus proxy error:") } func (d *DBus) Is(o Op) bool { |
