Re: shell error codes
From: gregg (greggory_at_netJUSTSAYNOcourrier.com)
Date: 11/07/04
- Next message: Weiguang Shi: "Re: cat problem"
- Previous message: Stephane CHAZELAS: "Re: cat problem"
- In reply to: Barry Margolin: "Re: shell error codes"
- Next in thread: Stachu 'Dozzie' K.: "Re: shell error codes"
- Reply: Stachu 'Dozzie' K.: "Re: shell error codes"
- Reply: Stephane CHAZELAS: "Re: shell error codes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 07 Nov 2004 20:40:23 +0100
Barry Margolin wrote:
> The shell doesn't report error codes, it reports the exit status of
> programs. These are not standardized, except that 0 means success and
> anything else is considered failure.
I agree to that when a program is launched by the shell.
But what of:
gregg@darkstar [0] ~$ ./jkkkl
bash: No such file or directory
gregg@darkstar [127] ~$
Here, "127" is for "no such file or directory", i.e "ENOENT"
What I want is to associate those integer values with their errno
counterpart. Some are C-ANSI defined, others Posix.1 (as I gather from
manpages).
Heck. I just wanted to understand what went wrong with error code
returned to the shell (not specific values returned by external
programs, which, as you have rightfully stated, may be whatever the
programmer decided it would; but those values the shell itself uses when
not finding a command, a file, or whatever...)
I suppose I'll have to read a bit of that Posix.1 paper just to get the
application Error value <---> ERRNO name
For I couldn't find it in the manpage (man 3 errno lists E codes all
right, but without giving their actual int value)
Anyway, thanks a lot
++
- Next message: Weiguang Shi: "Re: cat problem"
- Previous message: Stephane CHAZELAS: "Re: cat problem"
- In reply to: Barry Margolin: "Re: shell error codes"
- Next in thread: Stachu 'Dozzie' K.: "Re: shell error codes"
- Reply: Stachu 'Dozzie' K.: "Re: shell error codes"
- Reply: Stephane CHAZELAS: "Re: shell error codes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|