summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 2a32b3a..03c5020 100644
--- a/main.c
+++ b/main.c
@@ -62,13 +62,13 @@ static int ensure_fd_open(int fd, int flags) {
int main(int argc, char *argv[]) {
int ret = EXIT_FAILURE;
- if (ensure_fd_open(STDIN_FILENO, O_WRONLY) != 0) {
+ if (ensure_fd_open(STDIN_FILENO, O_RDONLY) != 0) {
goto done;
}
- if (ensure_fd_open(STDOUT_FILENO, O_RDONLY) != 0) {
+ if (ensure_fd_open(STDOUT_FILENO, O_WRONLY) != 0) {
goto done;
}
- if (ensure_fd_open(STDERR_FILENO, O_RDONLY) != 0) {
+ if (ensure_fd_open(STDERR_FILENO, O_WRONLY) != 0) {
goto done;
}