Skip to content

Instantly share code, notes, and snippets.

@fapestniegd
Created February 12, 2013 19:25
Show Gist options
  • Save fapestniegd/4772562 to your computer and use it in GitHub Desktop.
Save fapestniegd/4772562 to your computer and use it in GitHub Desktop.
int fd = open("/path/to/some/temp/file");
unlink("/path/to/some/temp/file");
write(fd, ....)
/* Rewind to beginning of file, and read out accumulated data */
lseek(fd, SEEK_SET, 0);
read(fd, ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment