From c16725a679c4f47a07c27ab947bcba9e21ecac9b Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 26 Feb 2026 16:32:35 +0900 Subject: [PATCH] internal/pkg: set container scheduling policy This is not as necessary as it was for nix, since internal/pkg only unblocks exclusive artifacts one at a time. Still, this is useful when running alongside an unprivileged music player which cannot set itself to a higher priority. Signed-off-by: Ophestra --- internal/pkg/exec.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/pkg/exec.go b/internal/pkg/exec.go index 92b14ab..5c1b399 100644 --- a/internal/pkg/exec.go +++ b/internal/pkg/exec.go @@ -23,7 +23,7 @@ import ( "hakurei.app/message" ) -// AbsWork is the container pathname [CureContext.GetWorkDir] is mounted on. +// AbsWork is the container pathname [TContext.GetWorkDir] is mounted on. var AbsWork = fhs.AbsRoot.Append("work/") // ExecPath is a slice of [Artifact] and the [check.Absolute] pathname to make @@ -39,6 +39,9 @@ type ExecPath struct { W bool } +// SchedPolicy is the [container] scheduling policy. +var SchedPolicy int + // PromoteLayers returns artifacts with identical-by-content layers promoted to // the highest priority instance, as if mounted via [ExecPath]. func PromoteLayers( @@ -408,6 +411,7 @@ func (a *execArtifact) cure(f *FContext, hostNet bool) (err error) { z.ParentPerm = 0700 z.HostNet = hostNet z.Hostname = "cure" + z.SchedPolicy = SchedPolicy if z.HostNet { z.Hostname = "cure-net" }