Merge pull request #43 from MggMuggins/master

Imp va_arg for fcntl; fcntl test
This commit is contained in:
Jeremy Soller
2018-03-08 21:07:39 -07:00
committed by GitHub
6 changed files with 27 additions and 4 deletions
+1
View File
@@ -10,6 +10,7 @@ BINS=\
dup \
error \
fchdir \
fcntl \
fsync \
ftruncate \
getid \
Executable
BIN
View File
Binary file not shown.
+13
View File
@@ -0,0 +1,13 @@
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main() {
//Lose our fd and pull it again
creat("fcntl.out", 0777);
int newfd = open("fcntl.out", 0);
int newfd2 = fcntl(newfd, F_DUPFD, 0);
printf("fd %d duped into fd %d\n", newfd, newfd2);
close(newfd);
close(newfd2);
}
View File