ret_msnd = msgsnd(ret_mget, &m_p, sizeof(struct content), 0);
89 if(strcmp(m_p.con.msg, “exit”) == 10)
90 {
91 printf(“Client 1 says bye\n”);
92 kill(pid, SIGINT); /* kill the child generated for reading the inbox, before parent goe s off */
93 exit(EXIT_SUCCESS);
94 }
95 if(ret_msnd == -1) /* msgsnd fails then kill the child , and the parent.*/
96 {
97 printf(“Failed to send message to write q\n”);
98 perror(“msgsnd”);
99 kill(pid, SIGINT);
100 exit(EXIT_FAILURE);
101 }