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

 
 

bug #19146: -fprintf returns unreliable result

Submitted by:  James Youngman <jay>
Submitted on:  Sun 25 Feb 2007 11:18:22 AM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Invalid
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.3.2Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 06 May 2007 12:32:54 PM UTCjayStatusNone=>Invalid
      Assigned toNone=>jay
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1