aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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. */