mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-06 02:18:06 +02: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>
This commit is contained in:
parent
c71a1f4347
commit
f723b28220
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