How to restore screen when plymouthd crash

fykcee1 at gmail.com fykcee1 at gmail.com
Mon Jul 18 01:42:12 PDT 2011


Hi,

Attachment is the third version of the patch, changes since V2:
 1. Remove ply_boot_splash_reset.
 2. Try to recover screen of state->default_tty (if open failed, then
try /dev/tty1 and /dev/hvc0)
 3. chvt to state->kernel_console_tty and adds WAITACTIVE ioctl after ACTIVATE.
 4. on_crash is now the handler of SIGBUS, SIGTERM, SIGQUIT.
 5. Not ignore SIGTERM in shutdown mode.
 6. Adjust indent.

Note for 4: SIGINT can't be handled here, since splash plugin will
change the handler later.

Note for 5: When reboot/poweroff/halt, systemd will sends SIGTERM and
then SIGKILL to remaining processes, and then do the real
reboot/poweroff/halt action. If the real action fails and plymouthd
doesn't recover the screen, user may not know what's happening.

2011/7/15 Ray Strode <halfline at gmail.com>
>
> 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.
Hmm, why?

>
>  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 ?
>
> If you do change vts, I think you should call the WAITACTIVE ioctl
> after ACTIVATE.
Sorry, I'm not  familiar with terminal programming, could I ask why we
need a WAITACTIVE ioctl follows ACTIVATE?

BTW, what's the difference between terminal and console?

Thanks.



--
Regards,
- cee1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-plymouthd-improve-screen-recover-when-crash.patch
Type: text/x-patch
Size: 4962 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20110718/92f7f559/attachment.bin>


More information about the plymouth mailing list