explain_open_or_die - open file and report errors
int explain_open_or_die(const char *pathname, int flags, int mode);
Given a pathname for a file, open() returns a file descriptor, a small,
non‐negative integer for use in subsequent system calls (read(2),
write(2), lseek(2), fcntl(2), etc.). The file descriptor returned by a
successful call will be the lowest‐numbered file descriptor not
currently open for the process. See open
(2) for more information.
On success, the new file descriptor is returned.
On error, a description of the error is obtained via explain_open
printed on stderr
. The process is the terminated via a call to the
libexplain version 1.3
Copyright (C) 2008 Peter Miller
Written by Peter Miller <firstname.lastname@example.org>