Skip to content

Commit 2899222

Browse files
authored
Merge pull request #1289 from AkihiroSuda/dev
Fix `can't get final child's PID from pipe` on rootless (v0.22.1 regression)
2 parents e9888fc + 37cb3fe commit 2899222

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/nerdctl/run_linux.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,15 @@ func setPlatformOptions(opts []oci.SpecOpts, cmd *cobra.Command, id string) ([]o
196196
}
197197

198198
func setOOMScoreAdj(opts []oci.SpecOpts, cmd *cobra.Command) ([]oci.SpecOpts, error) {
199+
if !cmd.Flags().Changed("oom-score-adj") {
200+
return opts, nil
201+
}
202+
199203
score, err := cmd.Flags().GetInt("oom-score-adj")
200204
if err != nil {
201205
return nil, err
202206
}
207+
// score=0 means literally zero, not "unchanged"
203208

204209
if score < -1000 || score > 1000 {
205210
return nil, fmt.Errorf("invalid value %d, range for oom score adj is [-1000, 1000]", score)

0 commit comments

Comments
 (0)