Dear all, Currently, whenever inmate_main() terminates, the cell_state is left 'running'. I was wondering whether there is a specific reason to do so, and what that reason would be. Especially when the cell is set to 'locked' this behavior is unexpected, as the cell cannot respond anymore.
Attached is a very minimal patch which sets the cell state to 'shutdown' upon calling stop(). I understand that this changes the behavior of the inmate library, which can be considered a public API in this project, so I would understand if this change is undesirable. I had one consideration remaining for the implementation of this patch. Is each cell guaranteed to have a comm_region? Currently, setup.c seems to assume so. The function stop() now checks whether there is one, as I expect it to be impossible to place the comm_region at address 0. If this is guaranteed, we should remove the check. Looking forward to hearing your thoughts, Best regards, Bram Hooimeijer ------ Bram Hooimeijer (1): inmates/lib: Set cell-state to shutdown in stop() inmates/lib/include/inmate_common.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.25.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/AS8PR02MB6663DBD37035EA38179F9361B6359%40AS8PR02MB6663.eurprd02.prod.outlook.com.
