Professional Documents
Culture Documents
Patterns
Chapter 7
void main() {
// Informer Process
int msg[MsgSize];
while( 1 ) {
// wait for a message to display
ReceiveMessage( my_queue, msg );
// inform the person the printing is done.
}
}
void main() {
// Signal Receiver
int signal_queue
= AttachMessageQueue( "/usr/queue/receiver" );
int msg[MsgSize];
// wait for the sender process to send the signal
ReceiveMessage( signal_queue, msg );
// Do something in response to the signal
}