[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Acl-devel] [ANNOUNCE] attr 2.4.47
From: |
Kamil Dudka |
Subject: |
Re: [Acl-devel] [ANNOUNCE] attr 2.4.47 |
Date: |
Tue, 21 May 2013 16:17:18 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32-358.el6.x86_64; KDE/4.3.4; x86_64; ; ) |
On Tuesday 21 May 2013 15:52:11 Christoph Anton Mitterer wrote:
> On Tue, 2013-05-21 at 14:47 +0200, Kamil Dudka wrote:
> > Providing more fine-grained error codes sounds useful. Is there any
> > similar utility that uses the error codes above?
>
> I don't think there's a real standard... just hat a short look at ls...
> but this seems to do it also the bad way, i.e.
> ls notExistingFile
> => $?=2
>
> ls --bogusOption
> => $?=2
>
>
> It seems to be crucial to thoroughly document which error code is used
> for what.
As for ls, POSIX [1] says this:
EXIT STATUS
The following exit values shall be returned:
0
Successful completion.
>0
An error occurred.
... and the documentation to GNU coreutils [2] says this:
Exit status:
0 success
1 minor problems (e.g., failure to access a file or directory not
specified as a command line argument. This happens when listing a
directory in which entries are actively being removed or renamed.)
2 serious trouble (e.g., memory exhausted, invalid option, failure
to access a file or directory specified as a command line argument
or a directory loop)
Kamil
[1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/ls.html
[2] http://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html