aboutsummaryrefslogtreecommitdiffstats
path: root/P2/lib
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-10-24 12:36:50 -0500
committerMatt Strapp <strap012@umn.edu>2020-10-24 12:36:50 -0500
commit2ab75f2342d4bdc0828aacb31679dc7810c69153 (patch)
tree20a07853cf9c5496ca8a343e15bcdd376375f04a /P2/lib
parentStart new branch (diff)
downloadcsci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.tar
csci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.tar.gz
csci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.tar.bz2
csci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.tar.lz
csci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.tar.xz
csci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.tar.zst
csci4061-2ab75f2342d4bdc0828aacb31679dc7810c69153.zip
Change dev enivronment
Diffstat (limited to 'P2/lib')
-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);
+ }
}