diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2023-03-29 19:54:02 -0300 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2023-04-03 13:21:56 -0300 |
commit | dc9375136720feda0efbdc2f16948d5f6472dbb8 (patch) | |
tree | 7840995d6aac09b9c87aaf980b672b235c2f0135 /libseat/backend | |
parent | 58d5133683ef9d7c32c607ab2fb0b5acffba1feb (diff) |
Matching the functionallity by the seatd open call. O_NONBLOCK is
specially important for libseat, otherwise it hangs while trying to
drain all events from an input device fd.
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'libseat/backend')
-rw-r--r-- | libseat/backend/noop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libseat/backend/noop.c b/libseat/backend/noop.c index 141ffd9..18f26c3 100644 --- a/libseat/backend/noop.c +++ b/libseat/backend/noop.c @@ -52,7 +52,7 @@ static const char *seat_name(struct libseat *base) { static int open_device(struct libseat *base, const char *path, int *fd) { (void)base; - int tmpfd = open(path, O_RDWR | O_CLOEXEC); + int tmpfd = open(path, O_RDWR | O_NOCTTY | O_NOFOLLOW | O_CLOEXEC | O_NONBLOCK); if (tmpfd < 0) { log_errorf("Failed to open device: %s", strerror(errno)); return -1; |