aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-11 21:06:44 +0900
committerOphestra <cat@gensokyo.uk>2026-03-12 00:52:18 +0900
commit04e6bc3c5c99d6a99f17cfa5f69f34fe8941aee2 (patch)
tree2ad64307c13e2f967fdf17c5f02e7682189b22e1 /internal
parent5c540f90aa5ac069a370cbef0ddd81fa268b43c5 (diff)
hst: expose scheduling policy
This is primarily useful for poorly written music players for now. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/outcome/outcome.go13
-rw-r--r--internal/outcome/shim.go1
2 files changed, 10 insertions, 4 deletions
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