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

 
 

bug #24873: Duplicate fprint option corrupts output

Submitter:  Federico Mena Quintero <federicomena>
Submitted:  Tue 18 Nov 2008 06:22:27 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.5.2 Fixed Release:  4.5.6b
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
Sat 17 Jan 2009 07:23:42 PM UTC, comment #2: 

Please respond.

James Youngman <jay>
Group administrator
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>
Group administrator
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 Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2010-03-31 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.5.6b
    2009-07-10 jay StatusIn Progress Fixed
    2009-07-06 jay StatusFixed In Progress
    2009-04-12 jay StatusReady For Test Fixed
    2008-11-30 jay Attached 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.15-e6e5.
    Corresponding source code