GNU bug report logs - #11816
sort -o: error comes late if opening the outfile fails

Previous Next

Package: coreutils;

Reported by: Bernhard Voelker <mail <at> bernhard-voelker.de>

Date: Fri, 29 Jun 2012 12:00:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 11816 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: 11816 <at> debbugs.gnu.org
Cc: P <at> draigBrady.com
Subject: Re: bug#11816: sort -o: error comes late if opening the outfile fails
Date: Mon, 02 Jul 2012 18:55:32 +0200
Pádraig Brady wrote:
>...
> diff --git a/tests/misc/sort-exit-early b/tests/misc/sort-exit-early
...
> +test $? == 124 && fail=1
> +
> +# Check all inputs are readable before starting to sort
> +# Also ensure the output isn't created in this case
> +touch output
> +chmod a-r output
> +timeout 10 sort -o typo - output && fail=1
> +test $? == 124 && fail=1

"make syntax-check" dinged these:

  tests/misc/sort-exit-early:24:test $? == 124 && fail=1
  tests/misc/sort-exit-early:31:test $? == 124 && fail=1
  maint.mk: use "test x = x", not "test x == x"
  make: *** [sc_prohibit_test_double_equal] Error 1


Here's a fix for a formatting nit in the sources:

   static void
  -check_inputs (char * const *files, size_t nfiles)
  +check_inputs (char *const *files, size_t nfiles)

Otherwise, it all looks fine.
Thanks again.




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.