bugfindutils - Bugs: bug #19146, -fprintf returns unreliable result

 
 

bug #19146: -fprintf returns unreliable result

Submitter:  James Youngman <jay>
Submitted:  Sun 25 Feb 2007 11:18:22 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.3.2 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 06 May 2007 12:32:54 PM UTC, comment #1: 

The errors are now reported, as part of the fix for bug #19416.  The exit status now also reflects the failure of any I/O.  The -fprintf predicate still always returns true, since this is probably what the user expects.  Imagine this example:-

find . -type f -fprint /foo/vanilla-files.txt -o -fprint /bar/other-files.txt

The intent of the user is plainly to list ordinary files in
/foo/vanilla-files.txt and list everything else (directories, for
example) in /bar/other-files.txt.    If an output error causes -fprint to fail and /foo is nearly full, then vanilla files will be listed in /foo/vanilla-files.txt until /foo is full.  After that point, vanilla files will be listed in /bar/other-files.txt until foo becomes not-full again.

That seems wrong, so -fprint  and -fprintf will always return true.  I/O errors will be reported in error messages and will cause the exit status to be nonzero.

The underlying problem was fixed in another bug, and so this one will be closed.

James Youngman <jay>
Group administrator
Sun 25 Feb 2007 11:18:22 AM UTC, original submission:  

Control falls off the end of the do_fprintf() function in 4.3.2 and so the result of the -fprintf action doesn't mean anything useful.   

In 4.2.29, pred_fprintf() always returns true.   (Which may not be desirable, since we fail to detect e.g. full filesystems).

James Youngman <jay>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-06 jay StatusNone Invalid
        Assigned toNone jay
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code