Created
August 10, 2018 02:52
-
-
Save takahisa/ebd3afa81e5b644d09fb937bbc08a250 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
int main(int argc, char **argv) { | |
int fd1 = open("./services", O_RDONLY); | |
int fd2 = open("./services", O_RDONLY); | |
printf("fd1: %d\nfd2: %d\n", fd1, fd2); | |
close(fd1); | |
close(fd2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment