summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipc.c b/src/ipc.c
index a55e22e..9c12ed4 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -2,6 +2,7 @@
#define IPC_C
#include <mqueue.h>
+#include <stdio.h>
#include <stdlib.h>
struct mq_attr attr = {
@@ -15,6 +16,7 @@ char* read_queue(mqd_t target) {
char* buf = malloc(attr.mq_msgsize);
int n = mq_receive(target, buf, attr.mq_msgsize, NULL);
if (n == -1) {
+ perror("mq_receive");
free(buf);
return NULL;
}