internal/system: remove ineffectual join reverting wayland
All checks were successful
Test / Create distribution (push) Successful in 38s
Test / Sandbox (push) Successful in 2m35s
Test / Sandbox (race detector) (push) Successful in 4m44s
Test / Hpkg (push) Successful in 4m59s
Test / Hakurei (push) Successful in 5m5s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m33s
All checks were successful
Test / Create distribution (push) Successful in 38s
Test / Sandbox (push) Successful in 2m35s
Test / Sandbox (race detector) (push) Successful in 4m44s
Test / Hpkg (push) Successful in 4m59s
Test / Hakurei (push) Successful in 5m5s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m33s
Removing the pathname socket used to be handled separately, now it is done during the Close call. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -3,11 +3,11 @@ package system
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/acl"
|
||||
"hakurei.app/internal/wayland"
|
||||
)
|
||||
|
||||
// Wayland maintains a wayland socket with security-context-v1 attached via [wayland].
|
||||
@@ -21,7 +21,7 @@ func (sys *I) Wayland(dst, src *check.Absolute, appID, instanceID string) *I {
|
||||
|
||||
// waylandOp implements [I.Wayland].
|
||||
type waylandOp struct {
|
||||
ctx *wayland.SecurityContext
|
||||
ctx io.Closer
|
||||
dst, src *check.Absolute
|
||||
appID, instanceID string
|
||||
}
|
||||
@@ -53,17 +53,11 @@ func (w *waylandOp) apply(sys *I) (err error) {
|
||||
}
|
||||
|
||||
func (w *waylandOp) revert(sys *I, _ *Criteria) error {
|
||||
var (
|
||||
hangupErr error
|
||||
removeErr error
|
||||
)
|
||||
|
||||
sys.msg.Verbosef("hanging up wayland socket on %q", w.dst)
|
||||
if w.ctx != nil {
|
||||
hangupErr = w.ctx.Close()
|
||||
sys.msg.Verbosef("hanging up wayland socket on %q", w.dst)
|
||||
return newOpError("wayland", w.ctx.Close(), true)
|
||||
}
|
||||
|
||||
return newOpError("wayland", errors.Join(hangupErr, removeErr), true)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *waylandOp) Is(o Op) bool {
|
||||
|
||||
Reference in New Issue
Block a user