In This Case Study You Will Implement A Simple Logging Service Built On Top Of A Mes 3059809

Practical Case Study C
Operating Systems Programming – 300698
1 Introduction
In this case study you will implement a simple logging service built on top of a message queue.
2 Specification
The task is broken into three parts, a message logging server, a library to log messages, and
a driver to test the library. You will need to review the lecture notes, and the documentation
supplied in Section 5 to implement these programs.
2.1 Message Logging Server
The message logging server should attempt to create the message queue, if this fails then
it should terminate with an error message, it should not run if the message queue actually
exists (IPC_EXCL will help here).
Once connected to the message queue, the program should sit in a loop, receiving a message,
and printing it to the stdout. Messages should be formatted:
id: message
where id is the type from the message structure and message is the message field.
The server should shutdown cleanly (i.e. delete the message queue) on receipt of a
SIGINT (generated by pressing control and C keys at the same time).
The sample code files logservice.h and logserver.c should form the basis of
your solution for this part.