perror(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨페이지이름
검색(S)

perror

Name
     perror, errno - print system error messages

Synopsis
     #include <stdio.h>

     void perror(const char *s)


     #include <errno.h>

     int errno;

Description
     The perror() function produces a  message  on  the  standard
     error  output  (file descriptor 2) describing the last error
     encountered during a call to a system or  library  function.
     The  argument string s is printed, followed by a colon and a
     blank, followed by the message and a NEWLINE character.   If
     s is a null pointer or points to a null string, the colon is
     not printed. The argument string should include the name  of
     the  program  that  incurred  the error. The error number is
     taken from the external variable errno, which  is  set  when
     errors  occur  but  not cleared when non-erroneous calls are
     made. See Intro(2).


     In the case of multithreaded applications,  the  -mt  option
     must  be  specified  on the command line at compilation time
     (see threads(5)). When the -mt option  is  specified,  errno
     becomes  a  macro  that  enables each thread to have its own
     errno. This errno macro can be used on either  side  of  the
     assignment as though it were a variable.

Usage
     Messages printed  from  this  function  are  in  the  native
     language  specified by the LC_MESSAGES locale category.  See
     setlocale(3C).

Attributes
     See attributes(5) for descriptions of the  following  attri-
     butes:



     tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i)  ATTRI-
     BUTE  TYPEATTRIBUTE  VALUE  _ Interface StabilityCommitted _
     MT-LevelMT-Safe _ StandardSee standards(5).

See Also
     Intro(2),    fmtmsg(3C),     gettext(3C),     setlocale(3C),
     strerror(3C), attributes(5), standards(5), threads(5)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 1.0 CSS3