I have the following code to create a file, and then map it into memory...I want to write to it and then read from it....
fd = open(argv, O_RDWR|O_CREAT, S_IRWXU);
if (fd < 0 )
buffer = mmap(0, (size_t)MAX_BUF_SIZE, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, 0);
if (buffer == MAP_FAILED)
Thanks for your help.