STRERROR(3) BSD Programmer's Manual STRERROR(3)
p
\bpe
\ber
\brr
\bro
\bor
\br, s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br, s
\bsy
\bys
\bs_
\b_e
\ber
\brr
\brl
\bli
\bis
\bst
\bt, s
\bsy
\bys
\bs_
\b_n
\bne
\ber
\brr
\br - system error messages
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<s
\bst
\btd
\bdi
\bio
\bo.
\b.h
\bh>
\b>
p
\bpe
\ber
\brr
\bro
\bor
\br(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bc_
\bh_
\ba_
\br _
\b*_
\bs_
\bt_
\br_
\bi_
\bn_
\bg);
_
\be_
\bx_
\bt_
\be_
\br_
\bn _
\bc_
\bh_
\ba_
\br _
\b*_
\bs_
\by_
\bs_
\b__
\be_
\br_
\br_
\bl_
\bi_
\bs_
\bt_
\b[_
\b]_
\b;
_
\be_
\bx_
\bt_
\be_
\br_
\bn _
\bi_
\bn_
\bt _
\bs_
\by_
\bs_
\b__
\bn_
\be_
\br_
\br_
\b;
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<s
\bst
\btr
\bri
\bin
\bng
\bg.
\b.h
\bh>
\b>
s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br(_
\bi_
\bn_
\bt _
\be_
\br_
\br_
\bn_
\bu_
\bm);
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
The s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br() and p
\bpe
\ber
\brr
\bro
\bor
\br() functions look up the error message string
corresponding to an error number.
The s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br() function accepts an error number argument _
\be_
\br_
\br_
\bn_
\bu_
\bm and re-
turns a pointer to the corresponding message string.
The p
\bpe
\ber
\brr
\bro
\bor
\br() function finds the error message corresponding to the cur-
rent value of the global variable _
\be_
\br_
\br_
\bn_
\bo (intro(2)) and writes it, fol-
lowed by a newline, to the standard error file descriptor. If the argu-
ment _
\bs_
\bt_
\br_
\bi_
\bn_
\bg is non-NULL, it is prepended to the message string and sepa-
rated from it by a colon and space (`: '). If _
\bs_
\bt_
\br_
\bi_
\bn_
\bg is NULL, only the
error message string is printed.
If _
\be_
\br_
\br_
\bn_
\bu_
\bm is not a recognized error number, the error message string will
contain ``Unknown error: '' followed by the error number in decimal.
The message strings can be accessed directly using the external array
_
\bs_
\by_
\bs_
\b__
\be_
\br_
\br_
\bl_
\bi_
\bs_
\bt. The external value _
\bs_
\by_
\bs_
\b__
\bn_
\be_
\br_
\br contains a count of the messages
in _
\bs_
\by_
\bs_
\b__
\be_
\br_
\br_
\bl_
\bi_
\bs_
\bt. The use of these variables is deprecated; s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br()
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
The s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br() and p
\bpe
\ber
\brr
\bro
\bor
\br() functions first appeared in 4.4BSD.
For unknown error numbers, the s
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br() function will return its result
in a static buffer which may be overwritten by subsequent calls.
4th Berkeley Distribution June 9, 1993 1