[Top][All Lists]

[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: Gecko/2008092417 Firefox/3.0.3


                 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




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:


  Message sent via/by Savannah

reply via email to

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