aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/raw-data.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-08-21 20:43:01 +0200
committerMattias Andrée <maandree@operamail.com>2015-08-21 20:43:01 +0200
commit16b25c8a426c285c85c24db115c677218d287da9 (patch)
tree7712ef9bc069da7836bcf492edc5ca915d8ceb5e /src/mds-kbdc/raw-data.c
parentm info (diff)
downloadmds-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-kbdc/raw-data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds-kbdc/raw-data.c b/src/mds-kbdc/raw-data.c
index 78d1939..a3b8ee4 100644
--- a/src/mds-kbdc/raw-data.c
+++ b/src/mds-kbdc/raw-data.c
@@ -140,7 +140,7 @@ static char* read_file(const char* restrict pathname, size_t* restrict size)
fail_if (xxrealloc(old, content, buf_ptr, char));
/* Close file decriptor for the file. */
- close(fd);
+ xclose(fd);
*size = buf_ptr;
return content;
@@ -150,7 +150,7 @@ static char* read_file(const char* restrict pathname, size_t* restrict size)
free(old);
free(content);
if (fd >= 0)
- close(fd);
+ xclose(fd);
return NULL;
}