mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-04-20 21:20:47 +02:00
ei: Use the signal protected wrappers
To prevent against unexpected interrupted system calls. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
1991b8f52d
commit
8bcbc53c0f
3 changed files with 3 additions and 3 deletions
|
|
@ -203,7 +203,7 @@ ei_keymap_new(enum ei_keymap_type type, int fd, size_t size)
|
|||
if (fd < 0 || size == 0)
|
||||
return NULL;
|
||||
|
||||
int newfd = dup(fd);
|
||||
int newfd = xdup(fd);
|
||||
if (newfd < 0)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ eis_device_new_keymap(struct eis_device *device,
|
|||
if (fd < 0 || size == 0)
|
||||
return NULL;
|
||||
|
||||
int newfd = dup(fd);
|
||||
int newfd = xdup(fd);
|
||||
if (newfd < 0)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ reis_new(int eisfd)
|
|||
{
|
||||
_unref_(reis) *reis = reis_create(NULL);
|
||||
|
||||
reis->eisfd = dup(eisfd);
|
||||
reis->eisfd = xdup(eisfd);
|
||||
if (reis->eisfd == -1)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue