LAB3 Message queue reader writer
LAB3 Message queue reader writer
h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <string.h>
struct msg_buffer {
long msg_type;
char msg_text[MSG_SIZE];
};
int main() {
key_t key;
int msgid;
struct msg_buffer message;
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <string.h>
struct msg_buffer {
long msg_type;
char msg_text[MSG_SIZE];
};
int main() {
key_t key;
int msgid;
struct msg_buffer message;
// Generate the same key as the writer
key = ftok("writer_reader_communication", 65);
return 0;
}