perror man page on Plan9

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

PERROR(2)							     PERROR(2)

       perror, syslog, sysfatal - system error messages

       #include <u.h>
       #include <libc.h>

       void perror(char *s)

       void syslog(int cons, char *logname, char *fmt, ...)

       void sysfatal(char *fmt, ...)

       Perror  produces	 a  short  error  message  on  the standard error file
       describing the last error encountered during  a	call  to  the  system.
       First  the argument string s is printed, then a colon, then the message
       and a newline.  If s is nil, only the error  message  and  newline  are

       Syslog  logs  messages  in  the	file named by logname in the directory
       /sys/log; the file must already exist and should be append-only.	  Log‐
       name  must  contain  no	slashes.   The	message is a line with several
       fields: the name of the machine writing the message; the date and time;
       the  message  specified	by  the	 print(2) format fmt and any following
       arguments; and a final newline.	If cons is set or the log file	cannot
       be  opened,  the message is also printed on the system console.	Syslog
       can be used safely in multi-threaded programs.

       Sysfatal prints to standard error the name of the  running  program,  a
       colon  and a space, the message described by the print(2) format string
       fmt and subsequent arguments, and a newline.  It	 then  calls  exits(2)
       with  the  formatted  message  as  argument.  The program's name is the
       value of argv0, which will be set if the program uses the arg(2) inter‐
       face to process its arguments.  If argv0 is null, it is ignored and the
       following colon and space are suppressed.


       intro(2), errstr(2), the %r format in print(2)

       Perror is a holdover; the %r format in print(2) is preferred.

                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

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]
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