From 04e6bc3c5c99d6a99f17cfa5f69f34fe8941aee2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 11 Mar 2026 21:06:44 +0900 Subject: hst: expose scheduling policy This is primarily useful for poorly written music players for now. Signed-off-by: Ophestra --- internal/outcome/outcome.go | 13 +++++++++---- internal/outcome/shim.go | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'internal') diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go index 42b50389..cb86b390 100644 --- a/internal/outcome/outcome.go +++ b/internal/outcome/outcome.go @@ -99,12 +99,17 @@ func newOutcomeState(k syscallDispatcher, msg message.Msg, id *hst.ID, config *h Shim: &shimParams{ PrivPID: k.getpid(), Verbose: msg.IsVerbose(), + + SchedPolicy: config.SchedPolicy, }, - ID: id, - Identity: config.Identity, - UserID: hsu.MustID(msg), - Paths: env.CopyPathsFunc(k.fatalf, k.tempdir, func(key string) string { v, _ := k.lookupEnv(key); return v }), + ID: id, + Identity: config.Identity, + UserID: hsu.MustID(msg), + Paths: env.CopyPathsFunc(k.fatalf, k.tempdir, func(key string) string { + v, _ := k.lookupEnv(key) + return v + }), Container: config.Container, } diff --git a/internal/outcome/shim.go b/internal/outcome/shim.go index 8fc46f2a..53b37310 100644 --- a/internal/outcome/shim.go +++ b/internal/outcome/shim.go @@ -274,6 +274,7 @@ func shimEntrypoint(k syscallDispatcher) { cancelContainer.Store(&stop) sp := shimPrivate{k: k, id: state.id} z := container.New(ctx, msg) + z.SchedPolicy = state.Shim.SchedPolicy z.Params = *stateParams.params z.Stdin, z.Stdout, z.Stderr = os.Stdin, os.Stdout, os.Stderr -- cgit v1.3.1