bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] mktemp, sort, tac: don't use undefined after mkstemp failure


From: Jim Meyering
Subject: Re: [PATCH] mktemp, sort, tac: don't use undefined after mkstemp failure
Date: Thu, 14 Aug 2008 14:12:55 +0200

Eric Blake <address@hidden> wrote:

> According to Jim Meyering on 8/13/2008 12:50 PM:
> |    if (fd < 0)
> | -    die (_("cannot create temporary file in"), temp_dir);
> | +    {
> | +      error (0, errno, _("cannot create temporary file in %s"),
> | +        quote (temp_dir));
> | +      exit (SORT_FAILURE);
> | +    }
>
> Why not the single statement error (SORT_FAILURE, errno, _(...))?

Without the file or directory name, it's harder
to determine which file system is in question.
If I get a EIO or ENOSPC error, I want to know right away
if it was in /tmp, ".", /dev/shm, etc.  Otherwise, I'd
have to deduce from settings of $TMPDIR and options (e.g.,
to sort) which directory it is.




reply via email to

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