errno man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

PERROR(3C)							    PERROR(3C)

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, fol‐
       lowed 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 spec‐
       ified 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 speci‐
       fied by the LC_MESSAGES locale category.	 See setlocale(3C).

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Standard	      │
       ├────────────────────┼─────────────────┤
       │MT-Level	    │ MT-Safe	      │
       └────────────────────┴─────────────────┘

SEE ALSO
       Intro(2),   fmtmsg(3C),	 gettext(3C),	setlocale(3C),	 strerror(3C),
       attributes(5), standards(5), threads(5)

				 Jul 12, 2007			    PERROR(3C)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net