diff options
Diffstat (limited to 'findutils/xargs.c')
-rw-r--r-- | findutils/xargs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c index 5a5e1c64c..ec6d99cac 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
@@ -311,9 +311,7 @@ static int xargs_ask_confirmation(void) | |||
311 | int c, savec; | 311 | int c, savec; |
312 | 312 | ||
313 | if (!tty_stream) { | 313 | if (!tty_stream) { |
314 | tty_stream = fopen("/dev/tty", "r"); | 314 | tty_stream = bb_xfopen(CURRENT_TTY, "r"); |
315 | if (!tty_stream) | ||
316 | bb_perror_msg_and_die("/dev/tty"); | ||
317 | /* pranoidal security by vodz */ | 315 | /* pranoidal security by vodz */ |
318 | fcntl(fileno(tty_stream), F_SETFD, FD_CLOEXEC); | 316 | fcntl(fileno(tty_stream), F_SETFD, FD_CLOEXEC); |
319 | } | 317 | } |