aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-20 21:59:48 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-20 21:59:48 +0200
commitb45d2309d36aa1fc3fa7961c0f786b50ab1a914e (patch)
tree74892285ddef796206c949daaeaa6504bc11c51e
parentm + reuse display indices (diff)
downloadmds-b45d2309d36aa1fc3fa7961c0f786b50ab1a914e.tar.gz
mds-b45d2309d36aa1fc3fa7961c0f786b50ab1a914e.tar.bz2
mds-b45d2309d36aa1fc3fa7961c0f786b50ab1a914e.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/mds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds.c b/src/mds.c
index 95cd6da..ff60043 100644
--- a/src/mds.c
+++ b/src/mds.c
@@ -27,6 +27,7 @@
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
+#include <signal.h>
/**
@@ -99,7 +100,7 @@ int main(int argc_, const char** argv_)
perror(*argv);
continue;
}
- read_len = read(piddata, 1, sizeof(piddata) / sizeof(char), f);
+ read_len = fread(piddata, 1, sizeof(piddata) / sizeof(char), f);
if (ferror(f)) /* Failed to read. */
perror(*argv);
else if (feof(f) == 0) /* Did not read everything. */