projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9f4bb0
)
test: restore the hwdb/udev rules on SIGINT
author
Peter Hutterer
<peter.hutterer@who-t.net>
Tue, 19 Jul 2016 22:45:22 +0000
(08:45 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Tue, 2 Aug 2016 00:19:38 +0000
(10:19 +1000)
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>
test/litest.c
patch
|
blob
|
history
diff --git
a/test/litest.c
b/test/litest.c
index
492aa3a
..
2adec94
100644
(file)
--- 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);
}