|
NAMEcomerr() - prints error message and exitsSYNOPSIScomerr(format,arg1,...,argn) char *format; DESCRIPTIONcomerr() 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.RETURNSnoneRather than return, comerr() terminates the current process and exits with the system error number as the exit code. EXAMPLESif (( 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. SEE ALSOcomerrno(3), error(3), errmsg(3), error(3) geterrno(3), printf(3), format(3)NOTEScomerr() 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 #.
Visit the GSP FreeBSD Man Page Interface. |