qt6-bb10/src/platformsupport
Laszlo Agocs f6e6ef46b3 Fix up signal handling in QFbVtHandler
Start using signalfd where we can. Drop the crash (SIGSEGV, SIGBUS) handling completely.

The crash handling that was in place previously was not async-safe. It also prevented getting
a core dump. So just remove it. There is no safe solution for a single application process since
restoring the keyboard, video modes, etc. all need unsafe calls in the signal handler almost for sure.

We can however improve the handling of non-crash scenarios greatly:

Introduce support for SIGINT, allowing nicely and cleanly restoring the video
mode with the KMS backend when pressing Ctrl+C while QT_QPA_ENABLE_TERMINAL_KEYBOARD
is set.

Same goes for keyboard suspend (SIGTSTP, Ctrl+Z). When QT_QPA_ENABLE_TERMINAL_KEYBOARD is set,
platform plugins now have the possibility to act upon Ctrl+Z. As an example eglfs' KMS backend
is enhanced to handle this by restoring the video mode before suspending the process, and
reinitializing when brought into foreground again (SIGCONT).

SIGTERM is also handled. This is extremely handy when starting an application locally on the embedded
device and then kill-ing it via a remote ssh session. Keyboard and video mode is now cleanly restored.

Finally, when disabling the keyboard, try setting also KDSKBMUTE.

Change-Id: I2b3608dc23c798e2b39f74cb27f12dcb0e958435
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-03-06 07:13:21 +00:00
..
accessibility Update copyright headers 2015-02-11 06:49:51 +00:00
cfsocketnotifier Update copyright headers 2015-02-11 06:49:51 +00:00
cglconvenience Fixed license headers 2015-02-17 18:46:09 +00:00
clipboard Fixed license headers 2015-02-17 18:46:09 +00:00
dbusmenu D-Bus system tray: properly check whether StatusNotifierHost available 2015-02-20 11:41:40 +00:00
dbustray Do not attempt to unregister an unregistered dbus service 2015-02-20 12:52:43 +00:00
devicediscovery Update copyright headers 2015-02-11 06:49:51 +00:00
eglconvenience Fix up signal handling in QFbVtHandler 2015-03-06 07:13:21 +00:00
eventdispatchers Fixed license headers 2015-02-17 18:46:09 +00:00
fbconvenience Fix up signal handling in QFbVtHandler 2015-03-06 07:13:21 +00:00
fontdatabases OS X: Fix mixing writing systems, ligatures and text formatting 2015-03-05 09:34:14 +00:00
glxconvenience Update copyright headers 2015-02-11 06:49:51 +00:00
input Do not mark non-existent touch points as stationary 2015-02-14 22:12:54 +00:00
linuxaccessibility Update copyright headers 2015-02-11 06:49:51 +00:00
platformcompositor Update copyright headers 2015-02-11 06:49:51 +00:00
services Pass params of shareable type by const-ref rather than by value 2015-02-13 16:29:16 +00:00
themes D-Bus system tray: properly check whether StatusNotifierHost available 2015-02-20 11:41:40 +00:00
platformsupport.pro QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possible 2015-01-22 12:50:51 +01:00