dbus: filter signal exit error
All checks were successful
Test / Create distribution (push) Successful in 19s
Test / Fortify (push) Successful in 1m38s
Test / Data race detector (push) Successful in 3m1s
Test / Flake checks (push) Successful in 39s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-02-25 01:36:15 +09:00
parent 5a732d153e
commit b60c8fd511
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

View File

@ -149,6 +149,15 @@ func (p *Proxy) Wait() error {
errs[0] = nil
}
var exitError *exec.ExitError
if errors.As(errs[0], &exitError) &&
exitError != nil &&
exitError.Exited() &&
exitError.ExitCode() == -1 {
// exit due to signal
errs[0] = nil
}
// ensure socket removal so ephemeral directory is empty at revert
if err := os.Remove(p.session[1]); err != nil && !errors.Is(err, os.ErrNotExist) {
errs[1] = err