#include #include #include #include #include #include #define KEY 333 struct info { int x; char t[10]; }; struct msgbuf { long mtype; struct info data; }; main() { int j, qid; struct msgbuf msg; qid = msgget(KEY, 0); if (qid<0) perror("eroare la msgget:"); msg.mtype = 2; msg.data.x = 3; strcpy(msg.data.t, "lalala"); j = msgsnd(qid, &msg, sizeof(struct info), IPC_NOWAIT); if (j<0) perror("eroare la msgsnd:"); }