Select Git revision
objects-11.c
Forked from
Peter Gerwinski / hp
Source project has a limited visibility.
shm-3b.c 279 B
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
int main (void)
{
char buffer[42];
int file = open ("test.txt", O_RDONLY, 0444);
lseek (file, 0, SEEK_SET);
read (file, buffer, 42);
close (file);
printf ("%s\n", buffer);
return 0;
}