mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-04 17:50:15 +01:00
test: restore the hwdb/udev rules on SIGINT
We can't call system() in the signal handler but we are allowed to fork. Do that, update the hwdb and immediately exit the child again. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
f9f4bb0266
commit
51fb42cb60
1 changed files with 6 additions and 0 deletions
|
|
@ -852,6 +852,12 @@ litest_signal(int sig)
|
|||
/* in the sighandler, we can't free */
|
||||
}
|
||||
|
||||
if (fork() == 0) {
|
||||
/* child, we can run system() */
|
||||
litest_reload_udev_rules();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue