fork download
  1. #include <sys/ipc.h>
  2. #include <sys/shm.h>
  3. #include <stdio.h>
  4.  
  5. int main(void)
  6. {
  7. int shmid = shmget(734297, 256, IPC_CREAT | 0777);
  8. if (shmid == -1) printf("err shmget\n");
  9. char* shmd = shmat(shmid, NULL, 0);
  10. if (shmd == (char*)-1) printf("err shmat\n");
  11. return 0;
  12. }
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
Standard output is empty