1088 Chapter 52
52-6. Replace the use of a signal handler in Listing 52-6 (mq_notify_sig.c) with the use of
sigwaitinfo(). Upon return from sigwaitinfo(), display the values in the returned
siginfo_t structure. How could the program obtain the message queue descriptor in
the siginfo_t structure returned by sigwaitinfo()?
52-7. In Listing 52-7, could buffer be made a global variable and its memory allocated just
once (in the main program)? Explain your answer.