bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #24561] find -ok should not redirect stdin


From: Eric Blake
Subject: [bug #24561] find -ok should not redirect stdin
Date: Tue, 14 Oct 2008 20:20:08 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3

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: address@hidden
             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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]