diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-10-18 19:51:13 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-10-18 19:51:13 -0400 |
commit | b0216b9154915a60e981a0082d77930687475d54 (patch) | |
tree | 2c48d6982b2adcadc35ed005a631dd6be73177ae | |
parent | c2e9f525239d8bd9e46b7540c23c26a26a5d66f6 (diff) | |
download | bfs-b0216b9154915a60e981a0082d77930687475d54.tar.xz |
main: IN is read, OUT is write.
Oops :/
-rw-r--r-- | main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |