linux process killed after poweroff

Roberto Sassu roberto.sassu at huawei.com
Tue Jul 20 04:00:09 PDT 2021


Hi everyone

I found a change of behavior after:

commit ccf1236ecac476d9d2704866d9a476c86e387971
Author: Zhen Lei <thunder.leizhen at huawei.com>
Date:   Sat May 8 11:22:39 2021 +0800

    um: fix error return code in winch_tramp()

When linux (UML) is executed inside a script, the following
error message appears:


root@(none):/# poweroff -f
Powering off.
reboot: System halted
./test.sh: line 3: 1474370 Killed                  ./linux rootfstype=hostfs mem=256M init=/bin/bash
                                                                                                    137

Before this patch:

root@(none):/# poweroff -f
Powering off.
reboot: System halted

0

The script I used for the test is:

#! /bin/bash

./linux rootfstype=hostfs mem=256M init=/bin/bash
echo $?

I'm using the exit code of linux to determine whether or not
a test executed inside UML was successful. Is the new behavior
intended?

Thanks

Roberto

HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli



More information about the linux-um mailing list