summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-ifdown
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-06-07 15:52:46 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-18 10:59:33 +0100
commit02709d4709c56f9b9095e3555da35b659b03a8a3 (patch)
tree55deb9ea52d75d0193c407a21d01020f90de0e3f /scripts/runqemu-ifdown
parent461c305078c40fca8b5382e393e3e8513d4abfa4 (diff)
downloadopenembedded-core-02709d4709c56f9b9095e3555da35b659b03a8a3.tar.gz
runqemu: add SIGTERM handler to make sure things are cleaned up
Add SIGTERM handler so that runqemu could clean things up correctly when receving such signal. This problem was originally observed when running testimage. On some hosts, after running testimage task, the user has to manually operate on the tap interface (e.g. `sudo ip link del tap0') in order for the next runqemu command to launch successfully. The problem is about runqemu, SIGTERM and network manager on the host. In testimage task, the runqemu process will receive SIGTERM. In such situation, its cleanup() function is not run, resulting in tap interface not cleaned up. On some hosts, the network manager will bring down the tap interface automatically, thus this problem. I saw this problem on Fedora21. I think we'd better just clean up the tap interface ourselves. So this patch adds to runqemu a SIGTERM handler, in which the actual qemu process is terminated and other things cleaned up. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-ifdown')
0 files changed, 0 insertions, 0 deletions