Select Git revision
Forked from
Peter Gerwinski / bs
79 commits behind the upstream repository.
Peter Gerwinski authored
shm-1c.c 260 B
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
int main (void)
{
char buffer[42];
int shm = shm_open ("test", O_RDONLY, 0444);
lseek (shm, 0, SEEK_SET);
read (shm, buffer, 42);
printf ("%s\n", buffer);
return 0;
}