diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-02-09 18:35:25 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-02-09 18:35:25 -0500 |
commit | 49415accb857450cdeb4397c31cbe4d6e6e9591f (patch) | |
tree | f0530479eed24de99db9bcb02527aa04339e94fd /eval.c | |
parent | c0d14f854ffedd29cc6d53c8033c72573a63273e (diff) | |
download | bfs-49415accb857450cdeb4397c31cbe4d6e6e9591f.tar.xz |
Don't close stdin for -ok or -okdir
Turns out it violates POSIX, even though GNU find does it.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -468,17 +468,8 @@ bool eval_exec(const struct expr *expr, struct eval_state *state) { exec_chdir(ftwbuf); } - if (expr->exec_flags & EXEC_CONFIRM) { - if (redirect(STDIN_FILENO, "/dev/null", O_RDONLY) < 0) { - perror("redirect()"); - goto exit; - } - } - execvp(argv[0], argv); perror("execvp()"); - - exit: _Exit(EXIT_FAILURE); } |