Programming and posix - April 2002

April 3, 2002
Solution Symposium
Page 59
hp e3000
programming
and posix
error handling
errno is a global variable defined in <errno.h>
Functions:
char *strerror(int errnum);
void perror(const char *msg);
if ( (fd = open(pathname, O_RDWR)) < 0)
{
/* errno already set by open() */
perror("functionX(): open()");
return -1;
}