blob: 94a98a05305a50ed9a41a6ab409469778654a6a0 [file] [log] [blame]
/*
* shm_unlink.c
*
* POSIX shared memory support
*/
#include <stdlib.h>
#include <alloca.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
int shm_unlink(const char *path)
{
int len = strlen(path);
char *pathbuf = alloca(len+10);
memcpy(pathbuf, "/dev/shm/", 9);
memcpy(pathbuf+9, path, len+1);
return unlink(path);
}