URL:
<http://savannah.gnu.org/bugs/?24561>
Summary: find -ok should not redirect stdin
Project: findutils
Submitted by: ericb
Submitted on: Tue 14 Oct 2008 02:20:05 PM MDT
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Eric Blake
Originator Email: [EMAIL PROTECTED]
Open/Closed: Open
Discussion Lock: Any
Release: 4.5.2
Fixed Release: None
_______________________________________________________
Details:
http://lists.gnu.org/archive/html/bug-findutils/2008-10/msg00003.html
According to POSIX, -ok is supposed to be like -exec, except for the fact
that it prompts and read stdin. By that interpretation, it is a bug that find
redirects stdin of the child process of -ok from /dev/null; it should let the
child see the same stdin. If find's stdin is not seekable (such as a pipe),
then behavior is already unspecified; so it is okay for find to continue using
stdio to read prompts, as long as it resets the seekable fd back to the
newline that ended the response to the prompt, even though this means that
child processes will inherit piped stdin in an unknown state.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24561>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/