aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/fmsg/defer.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-11-16 21:19:45 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-11-16 21:19:45 +0900
commitdf33123bd7f1e0cb4e98580b7e63818c82aa7206 (patch)
tree8b21831634e6169eb875cbfd359fa4006d6c66b3 /internal/fmsg/defer.go
parent1a09b55bd4753c6d5cbecf96d1b56f23b0e44b95 (diff)
app: integrate fsu
This removes the dependency on external user switchers like sudo/machinectl and decouples fortify user ids from the passwd database. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/fmsg/defer.go')
-rw-r--r--internal/fmsg/defer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/fmsg/defer.go b/internal/fmsg/defer.go
index ed4a7735..0f3f5ad5 100644
--- a/internal/fmsg/defer.go
+++ b/internal/fmsg/defer.go
@@ -56,9 +56,10 @@ func Exit(code int) {
os.Exit(code)
}
-func Withhold() {
+func Suspend() {
dequeueOnce.Do(dequeue)
if wstate.CompareAndSwap(false, true) {
+ queueSync.Wait()
withhold <- struct{}{}
}
}