mirror of
https://github.com/containers/podman.git
synced 2025-12-08 06:39:05 +08:00
rootless: correctly propagate the exit status from the container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -27,13 +27,13 @@ func main() {
|
||||
debug := false
|
||||
cpuProfile := false
|
||||
|
||||
became, err := rootless.BecomeRootInUserNS()
|
||||
became, ret, err := rootless.BecomeRootInUserNS()
|
||||
if err != nil {
|
||||
logrus.Errorf(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
if became {
|
||||
os.Exit(0)
|
||||
os.Exit(ret)
|
||||
}
|
||||
|
||||
if reexec.Init() {
|
||||
|
||||
Reference in New Issue
Block a user