When vm-node terminates for whatever reason (testing is done, ctrl+c, crash) its QEMU children go on living as daemons. In general, this behavior is undesirable, as future tests on the images corresponding to these daemons can cause image corruption.
For development purposes, such behavior may be desirable e.g., to observe output from crete-run; however, development mode should be of use in that case.
I don't believe an adequate solution is to rely on vm-node to kill its QEMU children. Only when vm-node exits gracefully do the proper destructors get called which can do the infanticide.
Potential solution:
A Linux specific solution is to call prctl(PR_SET_PDEATHSIG, SIGHUP); from within QEMU. The kernel will then notify QEMU when its parent has died.
Note: distributed mode specific.
When vm-node terminates for whatever reason (testing is done, ctrl+c, crash) its QEMU children go on living as daemons. In general, this behavior is undesirable, as future tests on the images corresponding to these daemons can cause image corruption.
For development purposes, such behavior may be desirable e.g., to observe output from crete-run; however, development mode should be of use in that case.
I don't believe an adequate solution is to rely on vm-node to kill its QEMU children. Only when vm-node exits gracefully do the proper destructors get called which can do the infanticide.
Potential solution:
A Linux specific solution is to call
prctl(PR_SET_PDEATHSIG, SIGHUP);
from within QEMU. The kernel will then notify QEMU when its parent has died.