]> git.ipfire.org Git - thirdparty/plymouth.git/commit
main: Add a plymouthd-fd-escrow helper
authorRay Strode <rstrode@redhat.com>
Mon, 29 Mar 2021 20:22:40 +0000 (22:22 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 6 Apr 2021 11:15:05 +0000 (13:15 +0200)
commita0c743c76a3436b8db088398b8fee10d902bf9fd
tree10c4bafa1f76b317fa3b74720c07e97ba64b69d1
parenta4bb4c146b8461d872136684575ba15c8ab4c8c8
main: Add a plymouthd-fd-escrow helper

When plymouth receives SIGTERM during shutdown or reboot, we must
exit cleanly to avoid keeping files open on the rootfs and to avoid
making drmModeSetCrtc () calls after the kms driver's shutdown method
has ran.

But at the same time we also want the boot-splash to stay up (in its
idle form) until the system actually reboots or powers off.
So we want to avoid the boot-splash getting replaced by e.g.
the text-console.

Add a plymouthd-fd-escrow helper which will get forked off when we
receive a SIGTERM in reboot/shutdown mode with pixel-displays active.

This helper will keep the fds for the pixel-displays open, so that
the boot-splash stays up until the end.

Changes by Hans de Goede:
- Start the escrow helper from main.c instead of from the drm plugin
- Rename the helper from plymouthd-drm-escrow to plymouthd-fd-escrow, since it
  will be used to escrow fbdev fd-s too now
- In the child of the fork, continue with quiting normally (letting the
  bootsplash become idle) instead of exiting directly
- Make plymouthd-fd-escrow a normal dynamic binary instead of a static binary,
  the initrd already contains dynamic binaries so it does not have to be static
- Split the changes adding plymouth-switch-root-initramfs.service into a
  separate patch
- Rewrite commit message

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/Makefile.am
src/main.c
src/plymouthd-fd-escrow.c [new file with mode: 0644]