Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

ctermid_r(3) OSS Library Calls Reference Manual
Include the stdio.h header file
If you are using the Standard POSIX Threads library, you must:
Include the spthread.h header file
Link your application to:
/G/system/sysnn/zsptsrl (G-series)
or
/G/system/zdllnnn/zsptdll (H-series or J-series)
If you are running H06.21 or a later H-series RVU or J06.10 or a later J-series RVU,
compile your application using the #define _SPT_MODEL_ macro or an equivalent
compiler command option
If you are using this function in a threaded application on a system running H06.21 or a later H- |
series RVU or J06.10 or a later J-series RVU, or in a 64-bit application on a system running |
H06.24 or a later H-series RVU or J06.13 or a later J-series RVU, you might need to include |
additional files or use additional macros. For more information about threaded and 64-bit appli- |
cations in the OSS environment, see the Open System Services Programmers Guide.
RETURN VALUES
The ctermid_r( ) function returns the address of the generated pathname. Otherwise, a null
string is returned. Access to a pathname returned by the ctermid_r( ) function is not guaranteed.
For Guardian TNS or accelerated processes, a null pathname is returned and errno is set to
[ENOTOSS].
ERRORS
If any of the following conditions occur, the ctermid_r() function sets errno to the correspond-
ing value:
[ENOMEM] A null pointer was passed and static memory was not available to complete the
request.
[ENOTOSS] The program has called a function that can be called only from an OSS process
or from a Guardian native process.
RELATED INFORMATION
Functions: ctermid(3), ttyname(3), ttyname_r(3).
Files: thread_safety(5).
STANDARDS CONFORMANCE
H06.21 and later H-series RVUs, J06.10 and later J-series RVUs
This function conforms to IEEE Std 1003.1 2004, POSIX System Application Program Interface.
Standard POSIX Threads Library
This function is an extension to the UNIX98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
1168 Hewlett-Packard Company 527187-017