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_fcntl_or_die(3) Library Functions Manual explain_fcntl_or_die(3)NAME
explain_fcntl_or_die - manipulate a file descriptor and report errors
SYNOPSIS
#include <libexplain/fcntl.h>
int explain_fcntl_or_die(int fildes, int command, long arg);
DESCRIPTION
The explain_fcntl_or_die function is used to call the fcntl(2) system call. On failure an explanation will be printed to stderr, obtained
from explain_fcntl(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
int result = explain_fcntl_or_die(fildes, command, arg);
fildes The fildes, exactly as to be passed to the fcntl(2) system call.
command The command, exactly as to be passed to the fcntl(2) system call.
arg The arg, exactly as to be passed to the fcntl(2) system call.
Returns:
This function only returns on success, and it returns whatever was returned by the fcntl(2) call; depending on the command, this
may have no use. On failure, prints an explanation and exits, it does not return.
SEE ALSO fcntl(2)
manipulate a file descriptor
explain_fcntl(3)
explain fcntl(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_fcntl_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)