GNU bug report logs -
#11816
sort -o: error comes late if opening the outfile fails
Previous Next
Full log
View this message in rfc822 format
Pádraig Brady wrote:
...
> Subject: [PATCH] sort: avoid redundant processing with inaccessible inputs or
> output
>
> * src/sort.c (check_inputs): A new function to verify all inputs
> are accessible before further processing.
> (check_output): A new function to open or create a specified
> output file, before futher processing.
> (stream_open): Adjust to truncating the previously opened
> output file rather than opening directly.
> (avoid_trashing_input): Optimize to stat the output file
> descriptor, rather than the file name.
> (main): Call the new functions to check accessability of
Hi Pádraig,
Thanks for dealing with this.
So far, I've read through the commit log and NEWS:
s/accessability/accessibility/
> inputs and output, before processing starts.
...
> diff --git a/NEWS b/NEWS
> index 8c75a32..c51fb78 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -41,6 +41,12 @@ GNU coreutils NEWS -*- outline -*-
> patches as well as enough support to build on the Hurd, we no longer
> have any reason to include it here.
>
> +** Improvements
> +
> + sort will avoid redundant processing in the presence of inaccessible inputs,
s/will avoid/avoids/ (or "now avoids") ?
> + or unwritable output. Immediate errors are now given before any potentially
> + expensive processing is initiated.
Maybe replace that "Immediate ..." sentence with something like this:
Sort now diagnoses certain errors at start-up, rather than
only after potentially expensive processing.
This bug report was last modified 12 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.