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?
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?