bugfindutils - Bugs: bug #11517, find, xargs, locate, etc.: don't...

 
 

bug #11517: find, xargs, locate, etc.: don't hide write failures

Submitted by:  None
Submitted on:  Fri 07 Jan 2005 01:19:20 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Jim MeyeringOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.11
Fixed Release: 4.2.12

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 23 Jan 2005 12:28:08 AM UTC, comment #2:

You can download a release of findutils in which this problem is
fixed from ftp://alpha.gnu.org/gnu/findutils.

The releases on alpha.gnu.org are for testing purposes, so please
take the time to download the release and verify that your
problem has been solved. Once the release has been sufficiently
tested, it can be uploaded to ftp.gnu.org for everybody to use it.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 08 Jan 2005 12:33:42 PM UTC, comment #1:

This problem is fixed in the CVS code for findutils.
To resolve your problem, you could either wait for the
next official release of findutils, or check out a copy
of the code from the CVS repository for findutils.

James Youngman <jay>
Project AdministratorIn charge of this item.
Fri 07 Jan 2005 01:19:20 PM UTC, original submission:

Hello James,

Here's a patch that makes the findutils programs handle disk-full
(and I/O error, writing to closed stdout, etc.) conditions more robustly.

For example, without this change, running `find . > /dev/full' mistakenly
succeeds and gives no indication that there were write errors.

With the patch, I get this:

$ ./find . > /dev/full
./find: write error: No space left on device

2005-01-07 Jim Meyering <jim@meyering.net>

Report the error and fail when writing fails, e.g. to a full disk.
Before, each of these six programs would mistakenly exit successfully
when its standard output was redirected e.g., to a full disk.

  • find/find.c: Include closeout.h

(main): Arrange to call close_stdout via atexit.

  • locate/locate.c: Likewise.
  • xargs/xargs.c: Likewise.
  • locate/bigram.c: Likewise.
  • locate/code.c: Likewise.
  • locate/frcode.c: Likewise.
  • import-gnulib.sh (findutils_modules): Add closeout.

Also, you might want to remove the unnecessary `../gnulib/lib/'
prefixes in #include directives, e.g., changing this:

#include "../gnulib/lib/xalloc.h"

to this:

#include "xalloc.h"

Jim

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #2334:  findutils-close-stdout.patch added by None (5KiB - text/x-patch - patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 6 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 23 Jan 2005 12:28:08 AM UTCjayOpen/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.2.12
Sat 08 Jan 2005 12:33:42 PM UTCjayStatusNone=>Fixed
  Assigned toNone=>jay
  Fixed Release4.2.7=>None
Fri 07 Jan 2005 01:19:20 PM UTCNoneAttached File-=>Added findutils-close-stdout.patch, #2035

Back to the top


Powered by Savane 3.1-cleanup1