explain_open_or_die(3) Library Functions Manual explain_open_or_die(3)NAME
explain_open_or_die - open file and report errors
SYNOPSIS
#include <fcntl.h>
#include <libexplain/open.h>
int explain_open_or_die(const char *pathname, int flags, int mode);
DESCRIPTION
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.
RETURN VALUE
On success, the new file descriptor is returned.
On error, a description of the error is obtained via explain_open(3), and printed on stderr. The process is the terminated via a call to
the exit(EXIT_FAILURE) function.
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
AUTHOR
Written by Peter Miller <pmiller@opensource.org.au>
explain_open_or_die(3)
Check Out this Related Man Page
explain_fopen_or_die(3) Library Functions Manual explain_fopen_or_die(3)NAME
explain_fopen_or_die - open file and report errors
SYNOPSIS
#include <libexplain/fopen.h>
FILE *explain_fopen_or_die(const char *pathname, const char *flags);
DESCRIPTION
The explain_fopen_or_die() function opens the file whose name is the string pointed to by pathname and associates a stream with it. See
fopen(3) for more information.
This is a quick and simple way for programs to constitently report file open errors in a consistent and detailed fahion.
RETURN VALUE
Upon successful completion explain_fopen_or_die returns a FILE pointer.
If an error occurs, explain_fopen will be called to explain the error, which will be printed onto stderr, and then the process will termi-
nate by calling exit(EXIT_FAILURE).
SEE ALSO fopen(3)
stream open functions
explain_fopen(3)
explain fopen(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
AUTHOR
Written by Peter Miller <pmiller@opensource.org.au>
explain_fopen_or_die(3)
I am trying to right a function which uses a file descriptor to write to a log file. The problem is that the on the print statement the file descriptor is called bad. Now when I first open the file and print to it in the f_open function by passing the descriptor to f_print_log all works well,... (6 Replies)
helo
I install my product for koren language
I m uisng RHEL -4 operating system
now problem is whenever I open any file
vi filename
I got following error on the screen
E557: Cannot open termcap file
'vt100' not known. Available builtin terminals are:
builtin_ansi
... (1 Reply)
Hi Gurus,
I'm using HPUX system (unix based system).
When I execute "bdf" command, it will display the following information (sample data only):
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 2097152 1623080 470400 78% /tmp
/dev/vgsap/oracle 262144 6299 239910 3% /oracle... (18 Replies)
Hello all,
I am trying to edit a file using VI on hp-ux....but when i try to open the file using vi <filename> it dose not let me open up the right way...it just messes up the whole file....i cant even read that file...so for example...here is a file i created test1.txt...when i cat... (6 Replies)