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-vt.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-vt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mds-vt.c b/src/mds-vt.c index f8a05e7..2449aba 100644 --- a/src/mds-vt.c +++ b/src/mds-vt.c @@ -166,7 +166,7 @@ static int write_vt_file(void) fail: saved_errno = errno; if (fd >= 0) - close(fd); + xclose(fd); return errno = saved_errno, -1; } @@ -830,7 +830,7 @@ int vt_open(int vt, struct stat* restrict old_stat) fail: saved_errno = errno; if (fd >= 0) - close(fd); + xclose(fd); return errno = saved_errno, -1; } @@ -848,7 +848,7 @@ void vt_close(int fd, struct stat* restrict old_stat) xperror(*argv); eprint("while resetting TTY ownership."); } - close(fd); + xclose(fd); } |