fork download
  1.  
  2. #include <sys/ipc.h>
  3. #include <sys/msg.h>
  4. #include <string.h>
  5.  
  6. struct msg { long type; char text[100]; } m = {1, "Hi from sender"};
  7.  
  8. int main() {
  9. int qid = msgget(1234, IPC_CREAT | 0666);
  10. msgsnd(qid, &m, strlen(m.text) + 1, 0);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty