On Thu, 2006-09-07 at 12:48 +0000, Colin Watson wrote:
> I compared upstart's halt/poweroff implementation to sysvinit's, and
> there are a few differences which might be relevant. After #define
> translation, the halt/poweroff bit in sysvinit does:
>
> reboot(RB_ENABLE_CAD);
> kill(1, SIGTSTP);
> if (do_poweroff)
> reboot(RB_POWER_OFF);
> reboot(RB_HALT);
>
> The fallthrough appears to be deliberate; RB_ENABLE_CAD seems at least
> useful; and is it possible that the kernel's getting stuck before
> poweroff because init hasn't been SIGTSTPed?
>
This is pretty much the same as upstart's implementation ... the only
difference is that I use a switch() rather than a fall-through.
The kernel just has a switch() there too, so it's definitely not that.
Scott
--
Scott James Remnant
<email address hidden>
On Thu, 2006-09-07 at 12:48 +0000, Colin Watson wrote:
> I compared upstart's halt/poweroff implementation to sysvinit's, and RB_ENABLE_ CAD); RB_POWER_ OFF);
> there are a few differences which might be relevant. After #define
> translation, the halt/poweroff bit in sysvinit does:
>
> reboot(
> kill(1, SIGTSTP);
> if (do_poweroff)
> reboot(
> reboot(RB_HALT);
>
> The fallthrough appears to be deliberate; RB_ENABLE_CAD seems at least
> useful; and is it possible that the kernel's getting stuck before
> poweroff because init hasn't been SIGTSTPed?
>
This is pretty much the same as upstart's implementation ... the only
difference is that I use a switch() rather than a fall-through.
The kernel just has a switch() there too, so it's definitely not that.
Scott
--
Scott James Remnant
<email address hidden>