GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COMERR(3) Schily´s LIBRARY FUNCTIONS COMERR(3)

comerr() - prints error message and exits

comerr(format,arg1,...,argn)
char *format;

comerr() formats and prints a message on the error output stream. Part of the message is the last error encountered by the system while executing the process. comerr() begins its output with the current program name (as passed to it by exec() ) followed by a colon ":" and the detailed system error message. It then formats the user supplied format string and arguments in the form printf() would.

none
Rather than return, comerr() terminates the current process and exits with the system error number as the exit code.

if (( f = fileopen("file", "r")) == NULL)
	comerr("Cannot open file.\n");

On stderr it appears as:

prog_name: No such file or directory. Cannot open file.

comerrno(3), error(3), errmsg(3), error(3) geterrno(3), printf(3), format(3)

comerr() attempts to find a line in the message file that corresponds to the system error number. If none can be found, or it has trouble finding or reading the file, it simply says: error #.
15. Juli 1988 Joerg Schilling

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.