bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #11517] find, xargs, locate, etc.: don't hide write failures


From: anonymous
Subject: [bugs #11517] find, xargs, locate, etc.: don't hide write failures
Date: Fri, 07 Jan 2005 08:35:11 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041207 Firefox/1.0 (Debian package 1.0-5)

This mail is an automated notification from the bugs tracker
 of the project: findutils.




/**************************************************************************/
[bugs #11517] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11517>
Project: findutils
Submitted by: 0
On: Fri 01/07/2005 at 08:19

Category:  find
Severity:  5 - Average
Item Group:  Wrong result
Resolution:  None
Privacy:  Public
Assigned to:  None
Originator Name:  Jim Meyering
Originator Email:  address@hidden
Status:  Open
Release:  4.2.11
Fixed Release:  4.2.7


Summary:  find, xargs, locate, etc.: don't hide write failures

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  <address@hidden>

        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





File Attachments
-------------------

-------------------------------------------------------
Date: Fri 01/07/2005 at 08:19  Name: findutils-close-stdout.patch  Size: 4.91KB 
  By: None
patch
http://savannah.gnu.org/bugs/download.php?item_id=11517&amp;item_file_id=2035






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11517>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]