[OpenWrt-Devel] [PATCH procd 2/2] state: fix reboot causing shutdown inside LXC container

Petr Štetiar ynezz at true.cz
Thu Jan 23 04:28:02 EST 2020


Paul Oranje <por at oranjevos.nl> [2020-01-22 11:09:22]:

Hi,

thanks for review.

> > +	if (is_container()) {
> > +		reboot(reboot_event);
> When reboot returns, hasn't something gone wrong then ?

What do you suggest? 

I dont know how that behaves in all environments in order to answer that
question and I've following "However, in containers reboot() call is
ignored"[1] in my head since I've discovered it.

> > +		exit(EXIT_SUCCESS);
> The return below after exit() can never be reached.

What do you suggest? 

Does that additional return hurts that much? I mean, if we keep it, it's
clear, that the code bellow the return cant be ever reached, omitting it
leaves some possibility. Debugging this stuff is PITA. 

1. https://git.busybox.net/busybox/tree/init/init.c#n750

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list