fsync.c 253 B

123456789101112
  1. #include <unistd.h>
  2. #include <fcntl.h>
  3. #include <stdio.h>
  4. int main (int argc, char** argv) {
  5. int fd = open(".", 0, 0);
  6. int status;
  7. status = fsync(fd);
  8. printf("fsync exited with status code %d\n", status);
  9. close(fd);
  10. return 0;
  11. }