diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-31 22:58:26 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-31 22:58:26 +0900 |
| commit | 651cdf9ccb0b787331f54a0c7544612fb3bdb1ef (patch) | |
| tree | 40908048c223cdbd562d93ee08e5333ec867850a /internal/outcome | |
| parent | 68ff0a2ba624fc9c87a6feb331a01f64cdef4209 (diff) | |
internal/outcome: remove guard on main
This is no longer exported. Such a check is pointless.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome')
| -rw-r--r-- | internal/outcome/finalise.go | 6 | ||||
| -rw-r--r-- | internal/outcome/process.go | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/internal/outcome/finalise.go b/internal/outcome/finalise.go index 184bd905..3e6a9e35 100644 --- a/internal/outcome/finalise.go +++ b/internal/outcome/finalise.go @@ -6,7 +6,6 @@ import ( "fmt" "os" "os/user" - "sync/atomic" "hakurei.app/hst" "hakurei.app/message" @@ -26,12 +25,9 @@ type outcome struct { sys *system.I // Transmitted to shim. Populated during finalise. state *outcomeState - // Kept for saving to [state]. + // Retained for registering current instance. config *hst.Config - // Whether the current process is in outcome.main. - active atomic.Bool - ctx context.Context syscallDispatcher } diff --git a/internal/outcome/process.go b/internal/outcome/process.go index 64d83624..707359da 100644 --- a/internal/outcome/process.go +++ b/internal/outcome/process.go @@ -206,10 +206,6 @@ func (ms mainState) fatal(fallback string, ferr error) { // main carries out outcome and terminates. main does not return. func (k *outcome) main(msg message.Msg) { - if !k.active.CompareAndSwap(false, true) { - panic("outcome: attempted to run twice") - } - if k.ctx == nil || k.sys == nil || k.state == nil { panic("outcome: did not finalise") } |
