mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
runc exec: fix setting process.Scheduler
Commit 770728e1 added Scheduler field into both Config and Process,
but forgot to add a mechanism to actually use Process.Scheduler.
As a result, runc exec does not set Process.Scheduler ever.
Fix it, and a test case (which fails before the fix).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -708,6 +708,7 @@ func (c *Container) newInitConfig(process *Process) *initConfig {
|
||||
ProcessLabel: c.config.ProcessLabel,
|
||||
Rlimits: c.config.Rlimits,
|
||||
IOPriority: c.config.IOPriority,
|
||||
Scheduler: c.config.Scheduler,
|
||||
CreateConsole: process.ConsoleSocket != nil,
|
||||
ConsoleWidth: process.ConsoleWidth,
|
||||
ConsoleHeight: process.ConsoleHeight,
|
||||
@@ -733,6 +734,9 @@ func (c *Container) newInitConfig(process *Process) *initConfig {
|
||||
if process.IOPriority != nil {
|
||||
cfg.IOPriority = process.IOPriority
|
||||
}
|
||||
if process.Scheduler != nil {
|
||||
cfg.Scheduler = process.Scheduler
|
||||
}
|
||||
|
||||
// Set misc properties.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user