Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

See also “Special Considerations for Files in Restricted-Access Filesets” (page 122).
Using the rename() and rmdir() Functions
The rename() and rmdir() function calls are not allowed on /G, /dev, /dev/tty, /dev/null,
or /lost+found in the root directory of an OSS fileset. The rename() function cannot be used
on directories in the Guardian file system, but it can be used on Guardian permanent disk files,
provided the name arguments specify the same volume and the caller has Guardian write access
to the file. Subvolumes in the Guardian file system can be removed, but volumes cannot.
See also “Special Considerations for Files in Restricted-Access Filesets” (page 122).
Using the select() Function
The select() function checks the status of objects identified by bit masks called file descriptor
sets, and indicates which of the specified file descriptors is ready for reading, ready for writing,
or has an error condition pending.
You can use the select() function on:
Regular files (disk files) or EDIT files in the /G directory. Such files are always ready for
selection.
OSS terminal (Telserv or OSSTTY) objects, but only if the terminal process is on a system
running G06.27 and later G-series RVUs, H06.06 and later H-series RVUs, or J-series RVUs.
OSS regular files, sockets, and FIFOs.
Beginning with the release of product version T9055G12 and product version update (PVU)
T8645G08 AAO, LFD_SETSIZE was increased. In T8645G08 AAO, the LFD_SETSIZE literal
in the sys/time.h file was increased from 1024 to 4096. Object modules that were compiled
using pre-T8645G08-AAO header files use the smaller 1024 LFD_SETSIZE and are termed old
objects. Object modules that were compiled using T8645G08 AAO header files use the bigger
4096 LFD_SETSIZE and are termed new objects. The way an application behaves for old or
new objects depends on the way in which it calls the select() function. For more information,
see the select(2) reference page.
Using socket() and Related Functions
AF_INET and AF_INET6 Sockets
Calls to the OSS sockets functions for AF_INET and AF_INET6 connections can use an alternate
transport provider process if such a process has been started. The default transport provider process
for AF_INET sockets is $ZTC0. An alternate transport provider process can be named by setting
the Guardian MAP DEFINE =TCPIP^PROCESS^NAME for the sockets application before starting
the application or by calling the socket_transport_name_set() function while the application
is running. The current transport provider process name can be determined by calling the
socket_transport_name_get() function. If you want to use Parallel Library TCP/IP or NonStop
TCP/IPv6, use one of these methods to specify a TCPSAM or TCP6SAM process name for the
transport service provider. For information about how to determine the name of a TCPSAM or
TCP6SAM process, refer to the TCP/IP (Parallel Library) Configuration and Management Manual
or the TCP/IPv6 Configuration and Management Manual
AF_UNIX Sockets
OSS AF_UNIX sockets are used for communication between processes running in the same system.
Systems running RVUs earlier than J06.05 or H06.15 are using AF_UNIX Release 1 sockets and
software. Systems running J06.05 and later J-series RVUs or H06.16 and later H-series RVUs are
usingAF_UNIX Release 2 sockets and software. The AF_UNIX Release 2 software completely
replaces the AF_UNIX Release 1 software.
126 Porting UNIX Applications to the OSS Environment