bugfindutils - Bugs: bug #24873, Duplicate fprint option corrupts...

 
 

bug #24873: Duplicate fprint option corrupts output

Submitted by:  Federico Mena Quintero <federicomena>
Submitted on:  Tue 18 Nov 2008 06:22:27 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.5.2Fixed Release: 4.5.6b

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 06 Jul 2009 10:56:16 PM UTC, comment #4:

Well, it would have been fixed if I'd applied the patch. Hence targeted for 4.5.6. Still, some feedback would have been nice.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 12 Apr 2009 11:58:03 PM UTC, comment #3:

No response from the problem reporter; I'm going to go ahead and mark this as fixed.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 17 Jan 2009 07:23:42 PM UTC, comment #2:

Please respond.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 30 Nov 2008 02:45:37 PM UTC, comment #1:

I believe this patch should fix the problem; could you try it?

(The patch was made against the CVS trunk.)

(file #16950)

James Youngman <jay>
Project AdministratorIn charge of this item.
Tue 18 Nov 2008 06:22:27 PM UTC, original submission:

Say you have a command line like this:

find dirname -type f \( -name '*.foo' -fprint /tmp/out1 \
-o -name '*.bar' -fprint /tmp/out1 \) \
-o -name '*.baz' -fprint /tmp/out2

What happens then is that /tmp/out1 gets opened twice on different file descriptors. As the search results for each get written to each FD, the file's contents get overwritten at random times (depending on when stdio flushes its buffers for each FD).

The fprint action should detect duplicate filenames (or device/inode pairs for the opened files?) and just write to the file in order.

I caught this in Debian's apt-move script, by the way ("how did this ever work!?") :)

Federico Mena Quintero <federicomena>

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jay (Updated the item)
  • -unavailable- added by federicomena (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 Mar 2010 07:32:52 AM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.5.6b
    Fri 10 Jul 2009 09:04:50 AM UTCjayStatusIn Progress=>Fixed
    Mon 06 Jul 2009 10:56:16 PM UTCjayStatusFixed=>In Progress
    Sun 12 Apr 2009 11:58:03 PM UTCjayStatusReady For Test=>Fixed
    Sun 30 Nov 2008 02:45:37 PM UTCjayAttached File-=>Added 0001-Fix-Savannah-bug-24873-Duplicate-fprint-option-cor.patch, #16950
      StatusNone=>Ready For Test
      Assigned toNone=>jay

    Back to the top


    Powered by Savane 3.1-cleanup1