NAME
io_get_term_reason() — determine how last read terminated (OBSOLETED AT 10.30)
SYNOPSIS
#include <dvio.h>
int io_get_term_reason(int eid);
DESCRIPTION
io_get_term_reason()
returns the termination reason for the last
read made on this entity id.
eid
is an entity identifier of an open
HP-IB
raw bus, Centronics-compatible parallel interface, or
GPIO
device file obtained from an
open(),
dup(),
fcntl(),
or
creat()
call.
All entity identifiers descending from an
open()
request (such as from
dup()
or
fork())
set this status.
For example,
if the calling process had opened this entity identifier
and later forked,
the status returned would be from the last read done
by either the calling process or its child.
RETURN VALUE
io_get_term_reason()
returns a value indicating how the last read on
the specified entity identifier was terminated.
This value is interpreted as follows
(note that combinations are possible):
ERRORS
io_get_term_reason()
fails under the following circumstances, and sets
errno
(see
errno(2))
to the value indicated:
- [EBADF]
eid
does not refer to an open file.
- [ENOTTY]
eid
does not refer to a channel device file.
AUTHOR
io_get_term_reason()
was developed by HP.