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

 
 

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

Submitter:  None
Submitted:  Fri 07 Jan 2005 01:19:20 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Jim Meyering Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.11
Fixed Release:  4.2.12
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
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 Files:
   
   
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

 

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

Date Changed by Updated Field Previous Value => Replaced by
2005-01-23 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.12
2005-01-08 jay StatusNone Fixed
    Assigned toNone jay
    Fixed Release4.2.7 None
2005-01-07 None Attached File- Added findutils-close-stdout.patch, #2035

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code