aboutsummaryrefslogtreecommitdiffstats
path: root/P2/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--P2/lib/utils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c
index f164ee4..2d15d0f 100644
--- a/P2/lib/utils.c
+++ b/P2/lib/utils.c
@@ -3,7 +3,11 @@
char *getChunkData(int mapperID) {
int mid;
key_t key = 10;
- mid = msgget();
+ mid = msgget(key, 0666);
+ if (mid < 0) {
+ perror("Cannot open queue.\n");
+ exit(0);
+ }
}