Open System Services System Calls Reference Manual (G06.28+)

spt_fcntlx(2) OSS System Calls Reference Manual
NAME
spt_fcntlx - Controls open le descriptors (thread-aware version)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <sys/types.h>]
[#include <unistd.h>]
[#include <fcntl.h>]
#include <spthread.h>
int spt_fcntlx (
int ledes,
int request
[ , int argument1 | , struct ock *argument2 ]
);
PARAMETERS
filedes Species an open le descriptor obtained from a successful call to the
spt_acceptx(), creat(), dup(), spt_dup2x( ), spt_fcntlx(), open(), pipe( ),
socket(),orsocketpair() function
request Species the operation to be performed
argument1 Species a variable that depends on the value of the request parameter
argument2 Species a variable that depends on the value of the request parameter
DESCRIPTION
The spt_fcntlx( ) function is the thread-aware version of the fcntl() function.
The spt_fcntlx( ) function performs controlling operations on the open le specied by the ledes
parameter.
Values for the request parameter are:
F_DUPFD Returns a new le descriptor as listed:
Returns the lowest-numbered available le descriptor that is greater than
or equal to the argument1 parameter
References the same open
Returns the same le pointer as the original le (that is, both le descrip-
tors share one le pointer if the object is a le)
Returns the same access mode (read, write, or read/write)
Returns the same le status ags (that is, both le descriptors share the
same le status ags)
Clears the close-on-exec ag (FD_CLOEXEC bit) associated with the
new le descriptor so that the le remains open across calls to any func-
tion in the exec, tdm_exec,ortdm_spawn sets of functions
The value F_DUPFD is invalid for an OSSTTY or Telserv terminal device. If
this value is used in a call that species such a device for the ledes parameter,
the call fails and errno is set to [EINVAL].
7112 Hewlett-Packard Company 527186-005