MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 5 141
Command Definitions (FCONTROL - FLOCK)
FCONTROL
FPOINT or FREADDIR when append
mode
is active.Append
access
prohibits logical record pointer operations. For
example, call to FPOINT and FSPACE result in an access
violation for files opened for append
access
.
This
itemnum
is supported only for byte stream files. If the file referenced
by
filenum
is not a byte stream file. FCONTROL will fail with a CCL
condition code. An error code of 42 (operation inconsistent with device
type) is returned by FCHECK when it is called following this FCONTROL error.
52 Set Nonblock
This option can be used to set and reset the Nonblock flag of a file. When
the Nonblock flag is true, any attempt to perform I/O to the file, results in
the I/O procedure returning without blocking. If the I/O can be performed
without blocking, then the I/O is completed normally. When Nonblock is
false, I/O's will block if necessary. The
item
parameter must be set to 1 in
order to cause the Nonblock flag to be set to true. A value of zero will reset
the Nonblock flag. Any other value fo the
item
parameter results in an
error being returned.
The default value of
item
is 0.
Not all file types support this option.
53 Close File on Exec
This option allows the caller to set or reset closure of a specified file when a
POSIX exec( ) function is called. An
item
value of 0 causes the file
remain open on an exec( ). A value of 1 causes the file to close when an
exec( ) is performed. All other values of the
item
parameter return an
FSERR 8 - ILLEGAL
PARAMETER VALUE error. The default value of
item
is 0.
54 This item provides for compatibility with the ioct( ) function found in
most UNIX implementations. This option is only valid for streams and
network socket files and tape devices. Any attempt to use this option with
other file types results in an FSERR 8 - ILLEGAL PARAMETER VALUE error.
The
item
parameter must point to a structure that contains three ioctl(
) parameters:
Request
Arg
ioctl functional return
The first 32 bits contain a short pointer to the arg parameter. The arg
parameter is pointed to by reference due to the variable length depending
upon the requested function. The last 32 bits of the structure contains the
address of the location to write the functional return. Due to the nature of
the functional return, this item is an output only address. In pascal, the
structure is defined as follows:
ioctl_parm_ptr = ^ioctl_parm_type;