Files
RedBear-OS/tests/fcntl/fcntl.c
T
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00

14 lines
317 B
C

#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main(void) {
//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);
}