Skip to content

Commit 03cd3fd

Browse files
author
Mrunal Patel
authored
Merge pull request #329 from vishvananda/master
Use current process pid instead of assuming pid 1
2 parents a652af1 + 0cb503b commit 03cd3fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/runtimetest/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func validateLinuxProcess(spec *rspec.Spec) error {
129129
}
130130
}
131131

132-
cmdlineBytes, err := ioutil.ReadFile("/proc/1/cmdline")
132+
cmdlineBytes, err := ioutil.ReadFile("/proc/self/cmdline")
133133
if err != nil {
134134
return err
135135
}
@@ -167,7 +167,7 @@ func validateCapabilities(spec *rspec.Spec) error {
167167
last = capability.CAP_BLOCK_SUSPEND
168168
}
169169

170-
processCaps, err := capability.NewPid(1)
170+
processCaps, err := capability.NewPid(0)
171171
if err != nil {
172172
return err
173173
}

0 commit comments

Comments
 (0)