From df33123bd7f1e0cb4e98580b7e63818c82aa7206 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sat, 16 Nov 2024 21:19:45 +0900 Subject: 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 --- internal/fmsg/defer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/fmsg') 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{}{} } } -- cgit v1.3.1