mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-27 13:50:08 +01:00
tablet-pad-leds: Open led file with O_NONBLOCK | O_CLOEXEC
We don't want the file to be left open after any fork/exec, and we don't
want the read to be blocking; so open it as such.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
(cherry picked from commit f723b28220)
This commit is contained in:
parent
0d3d885a1a
commit
0cfe00f493
1 changed files with 1 additions and 1 deletions
|
|
@ -132,7 +132,7 @@ pad_led_new(struct libinput *libinput, const char *prefix, int group, int mode)
|
|||
if (rc == -1)
|
||||
goto error;
|
||||
|
||||
fd = open_restricted(libinput, path, O_RDONLY);
|
||||
fd = open_restricted(libinput, path, O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
errno = -fd;
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue