0
int main(void) {
    key_t key = ftok("/sys/ipc", 0);
    int shmid = shmget(key, 1024, IPC_CREATE | 0x0604);
}

when I run this code second time, because the key collision so the value of shmid is -1

How can I delete the key I set before?

Yu Hao
  • 119,891
  • 44
  • 235
  • 294

0 Answers0