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 <[email protected]> --- test/litest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/litest.c b/test/litest.c index 492aa3a..2adec94 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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); } -- 2.7.4 _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
