diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-21 20:43:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-21 20:43:01 +0200 |
commit | 16b25c8a426c285c85c24db115c677218d287da9 (patch) | |
tree | 7712ef9bc069da7836bcf492edc5ca915d8ceb5e /src/mds-kkbd.c | |
parent | m info (diff) | |
download | mds-16b25c8a426c285c85c24db115c677218d287da9.tar.gz mds-16b25c8a426c285c85c24db115c677218d287da9.tar.bz2 mds-16b25c8a426c285c85c24db115c677218d287da9.tar.xz |
add and use xclose and xfclose, we do not want close or fclose to be ignored because a singal interrupts it.
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-kkbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c index 9bb8294..284c56b 100644 --- a/src/mds-kkbd.c +++ b/src/mds-kkbd.c @@ -1413,7 +1413,7 @@ int open_leds(void) fail_if ((ledfd = open(SPARC_KBD, O_RDONLY)) < 0); if (ioctl(ledfd, GET_LED, &saved_leds) < 0) { - close(ledfd); + xclose(ledfd); fail_if (1); } return 0; @@ -1434,7 +1434,7 @@ void close_leds(void) if (ioctl(ledfd, SET_LED, saved_leds) < 0) xperror(*argv); #ifdef __sparc__ - close(ledfd); + xclose(ledfd); #endif } |