How to restore screen when plymouthd crash
Ray Strode
halfline at gmail.com
Fri Jul 15 07:11:01 PDT 2011
On Fri, Jul 15, 2011 at 12:33 AM, fykcee1 at gmail.com <fykcee1 at gmail.com> wrote:
> Thanks for the reply.
>
> Attachment is the second version of the patch, which will check for
> "/dev/" prefix for state->default_tty and state->kernel_console_tty.
You can't call snprintf from a signal handler. I also don't really
liike calling object methods from a signal handler either (i mean
ply_boot_splash_reset). I'd say crashes are exceptional situations,
which means we can't really trust the state our objects are in,
and there is always the ambiguity of which methods are "signal safe".
I agree that assuming /dev/tty1 is wrong though. Maybe memcpy the tty
into a static buffer ?
> The on_crash handler is running in the signal context, so we need do
> as little steps as possible, so I assume we only need to set VT_AUTO
> mode of state->default_tty, and chvt to state->kernel_console_tty, is
> it suitable?
If you do change vts, I think you should call the WAITACTIVE ioctl
after ACTIVATE.
--Ray
More information about the plymouth
mailing list