2022-05-31 07:29:27 +00:00
|
|
|
#include <stdio.h>
|
2024-01-31 10:14:41 +00:00
|
|
|
#include <sys/mman.h>
|
2022-05-31 07:29:27 +00:00
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
FILE *fp = fopen("lrt.out", "w");
|
|
|
|
|
|
|
|
int opn = shm_open("/stuffz0r", O_RDWR|O_CREAT, 0777);
|
|
|
|
if ( opn == -1 )
|
|
|
|
fprintf(fp, "shm_open failed\n");
|
|
|
|
else
|
|
|
|
fprintf(fp, "shm_open successful\n");
|
|
|
|
|
|
|
|
int unl = shm_unlink("/stuffz0r");
|
|
|
|
if ( unl == -1 )
|
|
|
|
fprintf(fp, "shm_unlink failed\n");
|
|
|
|
else
|
|
|
|
fprintf(fp, "shm_unlink successful\n");
|
|
|
|
|
2024-01-31 10:14:41 +00:00
|
|
|
fclose(fp);
|
2022-05-31 07:29:27 +00:00
|
|
|
return 0;
|
|
|
|
}
|