Programming and posix - February 2001

February 10, 2001
Solution Symposium
Page 58
hp e3000
programming
and posix
error handling
errno is a system global 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;
}