Open System Services System Calls Reference Manual Abstract This manual documents part of the HP NonStop Open System Services (OSS) application program interface. It is written for system and application programmers. Product Version N.A. Supported Release Version Updates (RVUs) This manual supports G06.28 and H06.04 and all subsequent G-series and H-series release version updates until otherwise indicated by its replacement publication.
Document History Part Number Product Version Published 527186-005 527186-004 527186-003 N/A N/A N/A February 2006 September 2005 July 2005
Contents _____________________________ What is New in This Manual . . . . . . . . . . . . . . . . . . . . ix . . . . . . . . . . . . . . . . . . . ix Changed Functions . . . . . . . . . . . . . . . . . . . xii New Functions About This Manual . . . . . . . . . . . . . . . . . . . . . . . xi Audience . . . . . . . . . . . . . . . . . . . . . . xii Purpose . . . . . . . . . . . . . . .
OSS System Calls Reference Manual fcntl . . . . . fork . . . . . fstat . . . . . fstatvfs . . . . fsync . . . . . ftruncate . . . . gamma_r . . . . getegid . . . . geteuid . . . . getgid . . . . . getgrent_r . . . getgrgid_r . . . getgrnam_r . . . getgroups . . . gethostbyaddr_r . . gethostbyname_r . gethostent_r . . . gethostname . . . getlogin . . . . getlogin_r . . . getnetbyaddr_r . . getnetbyname_r . . getnetent_r . . . getpeername . . . getpgid . . . . getpgrp . . . . getpid . . . . . getppid . . . .
Contents mkdir . mknod msgctl msgget msgrcv msgsnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Section 5. System Functions (n - p) . nice . . . . . . . open . . . . . . . pipe . . . . . . . pthread_atfork . . . . pthread_attr_destroy . . pthread_attr_getdetachstate pthread_attr_getguardsize_np pthread_attr_getinheritsched pthread_attr_getschedparam pthread_attr_getschedpolicy pthread_attr_getstackaddr . pthread_attr_getstacksize . pthread_attr_init . . .
OSS System Calls Reference Manual pthread_mutex_init . . . . pthread_mutex_lock . . . pthread_mutex_trylock . . pthread_mutex_unlock . . . pthread_mutexattr_destroy . pthread_mutexattr_getkind_np pthread_mutexattr_init . . . pthread_mutexattr_setkind_np pthread_once . . . . . pthread_self . . . . . . pthread_setcancelstate . . . pthread_setcanceltype . . . pthread_setconcurrency . . pthread_setschedparam . . pthread_setspecific . . . . pthread_sigmask . . . . pthread_testcancel . . . .
Contents sigaction . . . . . . sigpending . . . . . sigprocmask . . . . . sigsuspend . . . . . sockatmark . . . . . socket . . . . . . . socketpair . . . . . socket_transport_name_get socket_transport_name_set spt_accept . . . . . spt_acceptx . . . . . spt_awaitio . . . . . SPT_CANCEL . . . . spt_close . . . . . . spt_closex . . . . . spt_connect . . . . . spt_connectx . . . . SPT_CONTROL . . . spt_dup2x . . . . . spt_fclose . . . . . spt_fclosex . . . . . spt_fcntlx . . . . . spt_fd_read_ready . . .
OSS System Calls Reference Manual spt_getsx . . . . . . . . spt_getTMFConcurrentTransactions spt_getw . . . . . . . . spt_getwc . . . . . . . spt_getwchar . . . . . . spt_getwcharx . . . . . . spt_getwcx . . . . . . . spt_getwx . . . . . . . spt_INITRECEIVE . . . . . spt_interrupt . . . . . . . spt_interruptTag . . . . . SPT_LOCKFILE . . . . . SPT_LOCKREC . . . . . spt_OSSFileIOHandler_p . . . spt_printf . . . . . . . . spt_printfx . . . . . . . spt_putc . . . . . . . . spt_putchar . . . . . . .
Contents spt_sendto . . . . . . . . . . spt_sendtox . . . . . . . . . . spt_sendx . . . . . . . . . . SPT_SETMODE . . . . . . . . spt_setOSSFileIOHandler . . . . . . spt_setTMFConcurrentTransactions . . . spt_sleep . . . . . . . . . . . spt_system . . . . . . . . . . spt_TimerHandler_p . . . . . . . SPT_TMF_GetTxHandle . . . . . . SPT_TMF_Init . . . . . . . . . SPT_TMF_SetTxHandle . . . . . . SPT_UNLOCKFILE . . . . . . . SPT_UNLOCKREC . . . . . . . spt_unregFile . . . . . . . . . spt_unregOSSFileIOHandler .
OSS System Calls Reference Manual Section 9. System Functions (u) ulimit . . . . . umask . . . . . uname . . . . unlink . . . . . utime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 9-2 9-4 9-5 9-7 9-11 Section 10. System Functions (w) wait . . . . . waitpid . . . . write . . . . . writev . . . . . . . . .
Contents LIST OF TABLES Table 3−1. Ignored File Status Flags . . . . . . . . . . . . . . . . . 3-10 Table 3−2. Guardian File Type Mappings . . . . . . . . . . . . . . . . 3-27 Table 4−1. Guardian File Type Mappings . . . . . . . . . . . . . . . . 4-31 Table 7−1. Ignored File Status Flags (spt_fcntlx Function) . . . . . . . . . . . 7-113 Table 7−2. Levels of Guardian File Security . . . . . . . . . . . . . . .
What is New in This Manual This section describes changes made to the Open System Services System Calls Reference Manual since the 527186-004 edition.
OSS System Calls Reference Manual SPT_FILE_CLOSE_(2) SPT_READUPDATEX(2) SPT_WRITEUPDATEUNLOCKX(2) SPT_FILE_OPEN_(2) SPT_READX(2) SPT_WRITEUPDATEX(2) SPT_LOCKFILE(2) SPT_SETMODE(2) SPT_WRITEX(2) SPT_LOCKREC(2) SPT_UNLOCKFILE(2) The following functions implement nonblocking file-descriptor POSIX thread APIs for the G06.
What is New in This Manual spt_fgetwcx(2) spt_getwcharx(2) spt_readx(2) spt_fprintfx(2) spt_getwcx(2) spt_recvfromx(2) The following functions implement reentrant POSIX thread APIs for the G06.
OSS System Calls Reference Manual Changed Functions Information is revised to support a G06.28 feature in the following reference pages: spt_select(2) Modified to describe when to use this function instead of the spt_select_single_np(2) function. Added information about the SPT_THREAD_AWARE_PRAGMA and SPT_THREAD_AWARE_PRAGMA_NONBLOCK preprocessors for C++ applications and the SPT_THREAD_AWARE and SPT_THREAD_AWARE_NONBLOCK preprocessors for C applications.
About This Manual The HP NonStop Open System Services (OSS) application program interface (API) provides an open interface for programs to be run with the underlying HP NonStop operating system. The Open System Services System Calls Reference Manual contains reference pages for OSS system functions, files, and miscellaneous topics.
OSS System Calls Reference Manual Audience This manual is for system and application programmers who want to use the OSS application program interface provided with the HP NonStop operating system. The manual assumes that the reader is a programmer and is familiar with the C programming language. Purpose This manual provides a complete reference to all OSS system functions and their related files and miscellaneous topics.
About This Manual SYNOPSIS Appropriate syntax, including header files to be included and all parameter types. Some header files are required for POSIX.1-compliant applications but are optional for applications conforming to other standards. These header files are noted as "optional except for POSIX.1." PARAMETERS Descriptions of the parameters listed under the SYNOPSIS heading.
OSS System Calls Reference Manual • eld Manual (TNS/E systems only) • enoft Manual (TNS/E systems only) • H-Series Application Migration Guide • Inspect Manual • ld Manual • Native Inspect Manual (TNS/E systems only) • rld Manual • nld Manual • noft Manual • Open System Services Library Calls Reference Manual • Open System Services Porting Guide • Open System Services Programmer’s Guide • Open System Services Shell and Utilities Reference Manual • Open System Services User’s Guide
About This Manual Section Content Manual ___________________________________________________________________ (1) User commands OSS Shell and Utilities Reference Manual (2) System functions OSS System Calls Reference Manual (3) Library functions OSS Library Calls Reference Manual OSS System Calls Reference Manual (SPT_*( ) functions) (4) File formats and data structures OSS System Calls Reference Manual OSS Library Calls Reference Manual OSS Shell and Utilities Reference Manual (5) Miscellaneous
Section 1. System Functions (a - d) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with a through d. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
accept(2) OSS System Calls Reference Manual NAME accept - Accepts a new connection on a socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include
System Functions (a - d) accept(2) NOTES When a connection is available, a call to the select( ) function indicates that the file descriptor for the original socket is ready for reading. The accepted socket cannot itself accept more connections. The original socket remains open and can accept more connections. RETURN VALUES Upon successful completion, the accept( ) function returns the file descriptor of the accepted socket.
accept(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: bind(2), connect(2), listen(2), socket(2). STANDARDS CONFORMANCE The XPG4 specification allows certain behaviors to be implementer-defined. The following are choices of the HP implementation: • The HP implementation does not return the errno values [EAGAIN], [ENOSR], or [EPROTO].
System Functions (a - d) access(2) NAME access - Determines the accessibility of a file LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int access( const char *path, int access_mode); PARAMETERS path Points to the file pathname. When the path parameter refers to a symbolic link, the access( ) function returns information about the file pointed to by the symbolic link.
access(2) OSS System Calls Reference Manual Use From the Guardian Environment The access( ) function is one of a set of functions that have the following effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (a - d) [ENOENT] [ENOROOT] access(2) One of the following conditions exists: • The specified pathname does not exist. • The specified pathname is an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The path parameter specifies a file on a remote HP NonStop node but communication with the remote node has been lost. One of the following conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state.
asctime_r(2) OSS System Calls Reference Manual NAME asctime_r - Converts broken-down time into a date and time string (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptdll H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char *asctime_r ( const struct tm *timeptr, char *buf ); PARAMETERS timeptr Points to a type tm structure that contains the broken-down time. buf Points to the buffer where the converted time is stored.
System Functions (a - d) bind(2) NAME bind - Binds a name to a socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int bind( int socket, const struct sockaddr *address, size_t address_len ); PARAMETERS socket Specifies the file descriptor of the socket to be bound. address Points to a sockaddr structure that contains the address to be bound to the socket.
bind(2) OSS System Calls Reference Manual [EADDRNOTAVAIL] The specified address is not available on this HP NonStop node. [EAFNOSUPPORT] The specified address is not a valid address for the address family of the specified socket. [EBADF] The socket parameter is not a valid file descriptor. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available.
System Functions (a - d) bind(2) • The sockaddr structure specifies an empty string as a pathname. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed. [ENOTDIR] The socket is in the AF_UNIX domain and a component of the pathname specified in the sockaddr structure is not a directory. [ENOTSOCK] The socket parameter does not refer to a socket.
chdir(2) OSS System Calls Reference Manual NAME chdir - Changes the current working directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int chdir( const char *path); PARAMETERS path Points to the pathname of the directory.
System Functions (a - d) chdir(2) RETURN VALUES Upon successful completion, the chdir( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, and errno is set to indicate the error. ERRORS If any of these conditions occurs, the chdir( ) function sets errno to the corresponding value: [EACCES] The requested current working directory is not accessible because search permission is denied for a component of the pathname. [EFAULT] The path parameter is an invalid address.
chdir(2) OSS System Calls Reference Manual [ENOTDIR] A component of the pathname is not a directory. [ENXIO] The fileset containing the client’s current working directory or root directory is not mounted. [EOSSNOTRUNNING] The program attempted an operation on an object in the OSS environment while a required system process was not running. [EPERM] The program attempted an operation on a Guardian process or attempted to access a Guardian ZYQ subvolume.
System Functions (a - d) chmod(2) NAME chmod - Changes file-access permissions LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int chmod( const char *path, mode_t mode); PARAMETERS path Specifies the full pathname of the file.
chmod(2) OSS System Calls Reference Manual S_IWUSR Permits the file’s owner to write to the file. S_IXUSR Permits the file’s owner to execute the file (or to search the directory). S_IRWXG Permits the file’s group to read, write, and execute the file (or to search the directory). S_IRGRP Permits the file’s group to read the file. S_IWGRP Permits the file’s group to write to the file. S_IXGRP Permits the file’s group to execute the file (or to search the directory).
System Functions (a - d) chmod(2) Use From the Guardian Environment The chmod( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
chmod(2) OSS System Calls Reference Manual [ENOROOT] One of these conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state. • The current root fileset for the specified file is unavailable. The OSS name server for the fileset might have failed. • The specified file is on a remote HP NonStop node, and communication with the remote name server has been lost. [ENOTDIR] A component, other than the last part, of the path parameter is not a directory.
System Functions (a - d) chown(2) NAME chown - Changes the owner and group IDs of a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
chown(2) OSS System Calls Reference Manual The _POSIX_CHOWN_RESTRICTED feature is ignored for files in the Guardian file system (that is, for files in /G). Use From the Guardian Environment The chown( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory.
System Functions (a - d) [ENOROOT] chown(2) • The path parameter is an empty string. • The path parameter specifies a file in the Guardian file system (in /G) but cannot be mapped to a valid Guardian filename. • The path parameter names a symbolic link, but the file to which it refers does not exist. • The path parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost.
chown(2) OSS System Calls Reference Manual HP extensions to the XPG4 Version 2 specification are: • 1−22 The errno values [EFAULT], [EFSBAD], [EIO], [ENOROOT], [ENXIO], and [EOSSNOTRUNNING] can be returned.
System Functions (a - d) chroot(2) NAME chroot - Changes the effective root directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int chroot( const char *path); PARAMETERS path Specifies the new effective root directory.
chroot(2) OSS System Calls Reference Manual Use From the Guardian Environment The chroot( ) function is one of a set of functions that have the following effects when the first of them is called from the Guardian environment: • Two Guardian file-system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (a - d) [ENOENT] chroot(2) One of the following conditions exists: • The named directory does not exist. • The specified pathname is an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. [ENOROOT] The root fileset (fileset 0) is not in the STARTED state. [ENOTDIR] A component of the specified pathname is not a directory. [ENXIO] The fileset containing the client’s working directory or effective root directory is not mounted.
close(2) OSS System Calls Reference Manual NAME close - Closes a file descriptor LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int close( int filedes); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the accept( ), creat( ), dup( ), dup2( ), fcntl( ), open( ), pipe( ), socket( ), or socketpair( ) function.
System Functions (a - d) close(2) RELATED INFORMATION Functions: exec(2), fcntl(2), getsockopt(2), open(2), pipe(2), setsockopt(2), socket(2), tdm_execve(2), tdm_execvep(2). Files: signal(4). STANDARDS CONFORMANCE This function does not return the errno value [EINTR]. For an AF_INET or AF_INET6 socket, even if all these are true: • The socket is connection-oriented. • The SO_LINGER option is enabled for the socket. • The socket has untransmitted data. the close( ) function does not block.
connect(2) OSS System Calls Reference Manual NAME connect - Connects a socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int connect( int socket, const struct sockaddr *address, size_t address_len ); PARAMETERS socket Specifies the file descriptor for the socket. address Points to a sockaddr structure that contains the address of the peer socket.
System Functions (a - d) connect(2) If timeout occurs, the connect( ) call fails and errno is set to [ETIMEDOUT]; the connection is aborted. If a connect( ) call is interrupted by a signal that is caught while the call is blocked waiting to establish a connection, the connect( ) call fails and sets errno to [EINTR]; the connection is not aborted and is later established asynchronously.
connect(2) [EFAULT] OSS System Calls Reference Manual A user-supplied memory buffer cannot be accessed. [EHOSTUNREACH] The destination host cannot be reached. [EINPROGRESS] The socket is marked nonblocking (O_NONBLOCK is set) and the requested connection is not yet completed. The connection will be completed asynchronously. [EINTR] The attempt to connect was interrupted by delivery of a signal. The connection will be completed asynchronously.
System Functions (a - d) connect(2) • The sockaddr structure specifies an empty string as a pathname. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed. [ENOTDIR] The socket is in the AF_UNIX domain and a component of the pathname specified in the sockaddr structure is not a directory. [ENOTSOCK] The socket parameter does not refer to a socket.
creat(2) OSS System Calls Reference Manual NAME creat - Creates a regular file in the OSS environment or rewrites an existing file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include #include /* optional except for POSIX.1 */ /* optional except for POSIX.
System Functions (a - d) creat(2) • The owner ID of the file is set to the effective user ID of the process. • The group ID of the file is determined by the value of the S_ISGID flag in the parent directory. If S_ISGID is set, then the group ID of the file is set to the group ID of the parent directory; otherwise, the group ID of the file is set to the effective group ID of the calling process.
creat(2) OSS System Calls Reference Manual Opening Guardian Files If the file is a Guardian file (that is, a file in the /G file system), these rules apply: • The file can be opened only if it is one of these: — An odd, unstructured Enscribe file. In this case, it is opened as a regular file with a primary and secondary extent size that is a multiple of 2. If the extent size is odd, the open fails.
System Functions (a - d) creat(2) Use From the Guardian Environment A call to the creat( ) function in the Guardian environment requires an OSS pathname and returns an OSS file-system file descriptor, regardless of the file system containing the file.
creat(2) OSS System Calls Reference Manual [EINTR] A signal was caught during the open operation. This value is returned only for character special files (terminal devices) and for FIFO special files. [EINVAL] One of these conditions exists: • The call attempted to create a directory named lost+found in the root directory of an OSS fileset, or it attempted to create a directory named /dev, /dev/tty, or /dev/null in the root directory of the OSS file system.
System Functions (a - d) creat(2) • The function attempted to open a file in the Guardian file system, but the specified pathname cannot be mapped to a valid Guardian filename. • The path parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOMEM] The system has insufficient resources to allow another open file. [ENOROOT] The root fileset (fileset 0) is not in the STARTED state.
creat(2) OSS System Calls Reference Manual • If bits other than the file permission and appropriate file-type flags are set in the mode parameter, errno is set to [EINVAL]. • The O_TRUNC flag is ignored for files other than regular files. • An attempt to open an OSS directory with creat( ) fails. HP extensions to the XPG4 Version 2 specification are: 1−38 • Opening Guardian files (that is, files in the /G file system) is supported, as described under Opening Guardian Files in DESCRIPTION.
System Functions (a - d) ctermid_r(2) NAME ctermid_r - Generates the pathname for the controlling terminal (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char *ctermid_r ( char *s ); PARAMETERS s Indicates where to store the returned pathname. If the s parameter is a null pointer, the function returns a null character string.
ctermid_r(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference 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.
System Functions (a - d) ctime_r(2) NAME ctime_r - Converts time since the Epoch into a date and time string (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char *ctime_r ( const time_t *clock, char *buf ); PARAMETERS clock Points to a variable that specifies a time value in seconds. buf Points to the buffer where the converted time is stored.
dup(2) OSS System Calls Reference Manual NAME dup - Duplicates an open file descriptor LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int dup( int filedes); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the accept( ), creat( ), dup( ), dup2( ), fcntl( ), open( ), pipe( ), socket( ), or socketpair( ) function.
System Functions (a - d) dup(2) [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [EMFILE] The number of file descriptors exceeds the maximum number of opens permitted. [EWRONGID] One of these conditions occurred: • The process attempted an operation on an input/output process (such as a terminal server process) that has failed or is in the down state.
dup2(2) OSS System Calls Reference Manual NAME dup2 - Duplicates and controls an open file descriptor LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int dup2( int filedes, int new); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the accept( ), creat( ), dup( ), dup2( ), fcntl( ), open( ), pipe( ), socket( ), or socketpair( ) function.
System Functions (a - d) dup2(2) NOTES The dup2( ) function provides an alternative interface to the service provided by the fcntl( ) function by using the F_DUPFD value of the request parameter. The call: fid = dup2( file1, file2 ); is equivalent to: close( file2 ); fid = fcntl( file1, F_DUPFD, file2 ); RETURN VALUES Upon successful completion, the dup2( ) function returns a new file descriptor. Otherwise, the value -1 is returned, and errno is set to indicate the error.
Section 2. System Functions (e) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with e. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
exec(2) OSS System Calls Reference Manual NAME exec - Specifies a set of functions that execute a file DESCRIPTION The exec set of functions (execl( ), execle( ), execlp( ), execv( ), execve( ), and execvp( )) replace the current process image with a new process image. The new image is constructed from a regular executable file, called a new process image file. The new process image file is formatted as an executable text or binary file in one of the formats recognized by the exec set of functions.
System Functions (e) execl(2) NAME execl - Executes a file using a pathname, a set of argument strings, and **environ LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execl( const char ∗ path, const char ∗ arg, . . .); PARAMETERS **environ Points to an array of character pointers to environment strings. The environment strings define the OSS environment for the new process.
execl(2) OSS System Calls Reference Manual counted in argc. The arguments specified by a program with one of the exec set of functions are passed on to the new process image in the corresponding arguments to the main( ) function. The envp[ ] parameter for the main function is an HP extension and is not the preferred method of obtaining the environment variables for the new process. Use of the **environ array is the preferred method.
System Functions (e) execl(2) For those file descriptors that remain open, all attributes of the open file descriptor, including file locks, remain unchanged. All directory streams are closed. Shared Memory Any attached shared memory segments are detached by a successful call to a function in the exec set of functions. Refer to the shmat(2) reference page for additional information about shared memory segment use.
execl(2) OSS System Calls Reference Manual • Session membership • Real user ID • Real group ID • Supplementary group IDs • The time left until an alarm clock signal is posted (see the alarm(3) reference page) • Current working directory • Root directory • File mode creation mask (see the umask(2) reference page) • Process signal mask (see the sigprocmask(2) reference page) • Pending signals (see the sigpending(2) reference page) • The tms_utime, tms_stime, tms_cutime, and tms_cstime f
System Functions (e) execl(2) • Login, remote, and saveabend flags • File creation mask The Guardian attributes of the new process differ from those of the calling process in the following ways: • Segments created or shared using Guardian procedure calls such as SEGMENT_ALLOCATE_ are not inherited. • The program file is the file specified in the function call. • The library file is specified in the program file. • The new process does not inherit the caller’s extended swap file (if any).
execl(2) OSS System Calls Reference Manual Use From the Guardian Environment If called from a Guardian process, the function call fails and errno is set to [ENOTOSS]. RETURN VALUES If the execl( ) function returns to the calling process image, an error has occurred; the return value is -1, and errno is set to indicate the error. ERRORS If any of the following conditions occurs, the function sets errno to the corresponding value.
System Functions (e) execl(2) • The intermediate result of pathname resolution when a symbolic link is part of the pathname pointed to by the path parameter The pathconf( ) function can be called to obtain the applicable limits. [ENODEV] The system cannot find the device containing the fileset containing the process image file. [ENOENT] One of the following conditions exists: • One or more components of the new process image file’s pathname do not exist.
execl(2) OSS System Calls Reference Manual The following are HP extensions to the XPG4 Version 2 specification: 2−10 • Text files containing the #! interpreter_name [optional_string] header line can execute. • The [EINVAL], [ENODEV], [ENOTOSS], and [EUNKNOWN] error values are an HP extension.
System Functions (e) execle(2) NAME execle - Executes a file using a pathname, a set of argument strings, and an undeclared envp array LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execle( const char ∗ path, const char ∗ arg, . . . /* , (char *)0, char *const envp[ ] */ ); PARAMETERS **environ Points to an array of character pointers to environment strings.
execle(2) OSS System Calls Reference Manual Entering the New Process When a program is executed as a result of a call to a function in the exec set of functions, it is entered as a function call as follows: int main( int argc, char ∗ argv[ ], char ∗ env[ ]); Here, the argc parameter is the argument count, the argv[ ] parameter is an array of character pointers to the arguments themselves, and env[ ] is a pointer to a character array listing the environment variables.
System Functions (e) • execle(2) The first value of arg is discarded. The S_ISUID and S_ISGID mode bits of an executable text file are honored. Those bits of the interpreter_name command interpreter are ignored. When the File Is Invalid If the process image file is not a valid executable object, or if the text file does not contain the header line, the execle( ) function call fails and sets errno to the value of [ENOEXEC].
execle(2) OSS System Calls Reference Manual User ID and Group ID If the set-user-ID mode bit of the new process image file is set (see the chmod(2) reference page), the effective user ID of the new process image is set to the owner ID of the new process image file. Similarly, if the set-group-ID mode bit of the new process image file is set, the effective group ID of the new process image is set to the group ID of the new process image file.
System Functions (e) execle(2) • Home terminal • Job ID • DEFINE mode switch • Process access ID (PAID), unless the S_ISUID mode bit of the new image file is set • Security group list • Job ancestor or GMOM • Unread system message index (PCBMCNT) This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
execle(2) OSS System Calls Reference Manual • The creator access ID (CAID) is set to the process access ID (PAID) of the calling process. • The PAID depends on whether the S_ISUID mode bit of the image file is set. If so, the PAID is based on the file owner ID. If not, the PAID is the same as for the caller. (The S_ISUID mode bit of the image file has no effect on the security group list.) • The MOM field for the new process depends on whether the calling process is named.
System Functions (e) execle(2) [EFAULT] An input address parameter is outside valid bounds limits. [EINVAL] The new process image file is a binary executable file with invalid attributes. [ELOOP] Too many symbolic links were encountered in pathname resolution. [EMFILE] The maximum number of files is open. The process attempted to open more than the maximum number of file descriptors allowed for the process.
execle(2) OSS System Calls Reference Manual Miscellaneous: environ(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • Guardian attributes are associated with the new OSS process. See Guardian Attributes under DESCRIPTION. • The contents of the st_atime field following a failed function call in which the file was found should not be depended upon for further processing.
System Functions (e) execlp(2) NAME execlp - Executes a file using a filename, a set of argument strings, and **environ LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execlp( const char ∗ file, const char ∗ arg, . . .); PARAMETERS **environ Points to an array of character pointers to environment strings. The environment strings define the OSS environment for the new process.
execlp(2) OSS System Calls Reference Manual Entering the New Process When a program is executed as a result of a call to a function in the exec set of functions, it is entered as a function call as follows: int main( int argc, char ∗ argv[ ], char ∗ env[ ]); Here, the argc parameter is the argument count, the argv[ ] parameter is an array of character pointers to the arguments themselves, and env[ ] is a pointer to a character array listing the environment variables.
System Functions (e) execlp(2) • argv[0] is set to the string "sh". • argv[1] is set to the original value of the file parameter. • The remaining elements of argv[ ] are set to the second and subsequent values of the arg parameter. • The first instance of arg is discarded.
execlp(2) OSS System Calls Reference Manual User ID and Group ID If the set-user-ID mode bit of the new process image file is set (see the chmod(2) reference page), the effective user ID of the new process image is set to the owner ID of the new process image file. Similarly, if the set-group-ID mode bit of the new process image file is set, the effective group ID of the new process image is set to the group ID of the new process image file.
System Functions (e) execlp(2) • Home terminal • Job ID • DEFINE mode switch • Process access ID (PAID), unless the S_ISUID mode bit of the new image file is set • Security group list • Job ancestor or GMOM • Unread system message index (PCBMCNT) This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
execlp(2) OSS System Calls Reference Manual • The creator access ID (CAID) is set to the process access ID (PAID) of the calling process. • The PAID depends on whether the S_ISUID mode bit of the image file is set. If so, the PAID is based on the file owner ID. If not, the PAID is the same as for the caller. (The S_ISUID mode bit of the image file has no effect on the security group list.) • The MOM field for the new process depends on whether the calling process is named.
System Functions (e) execlp(2) [EFAULT] An input address parameter is outside valid bounds limits. [EINVAL] The new process image file is a binary executable file with invalid attributes. [ELOOP] Too many symbolic links were encountered in pathname resolution. [EMFILE] The maximum number of files is open. The process attempted to open more than the maximum number of file descriptors allowed for the process.
execlp(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • Guardian attributes are associated with the new OSS process. See Guardian Attributes under DESCRIPTION. • [ENOENT] is returned in errno if the environment variable PATH is not defined when the execlp( ) function is called.
System Functions (e) execv(2) NAME execv - Executes a file using a pathname, an argv array, and **environ LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execv( const char ∗ path, char ∗ const argv[ ]); PARAMETERS **environ Points to an array of character pointers to environment strings. The environment strings define the OSS environment for the new process.
execv(2) OSS System Calls Reference Manual counted in argc. The arguments specified by a program with one of the exec set of functions are passed on to the new process image in the corresponding arguments to the main( ) function. The env[ ] parameter for the main function is an HP extension and is not the preferred method of obtaining the environment variables for the new process. Use of the **environ array is the preferred method.
System Functions (e) execv(2) For those file descriptors that remain open, all attributes of the open file descriptor, including file locks, remain unchanged. All directory streams are closed. Shared Memory Any attached shared memory segments are detached by a successful call to a function in the exec set of functions. Refer to the shmat(2) reference page for additional information about shared memory segment use.
execv(2) OSS System Calls Reference Manual • Session membership • Real user ID • Real group ID • Supplementary group IDs • The time left until an alarm clock signal is posted (see the alarm(3) reference page) • Current working directory • Root directory • File mode creation mask (see the umask(2) reference page) • Process signal mask (see the sigprocmask(2) reference page) • Pending signals (see the sigpending(2) reference page) • The tms_utime, tms_stime, tms_cutime, and tms_cstime f
System Functions (e) execv(2) • Login, remote, and saveabend flags • File creation mask The Guardian attributes of the new process differ from those of the calling process in the following ways: • Segments created or shared using Guardian procedure calls such as SEGMENT_ALLOCATE_ are not inherited. • The program file is the file specified in the function call. • The library file is specified in the program file. • The new process does not inherit the caller’s extended swap file (if any).
execv(2) OSS System Calls Reference Manual Use From the Guardian Environment If called from a Guardian process, the function call fails and errno is set to [ENOTOSS]. RETURN VALUES If the execv( ) function returns to the calling process image, an error has occurred; the return value is -1, and errno is set to indicate the error. ERRORS If any of the following conditions occurs, the function sets errno to the corresponding value.
System Functions (e) execv(2) • A component of the pathname pointed to by the path parameter • The intermediate result of pathname resolution when a symbolic link is part of the pathname pointed to by the path parameter The pathconf( ) function can be called to obtain the applicable limits. [ENODEV] The system cannot find the device containing the fileset containing the process image file.
execv(2) OSS System Calls Reference Manual The following are HP extensions to the XPG4 Version 2 specification: 2−34 • Text files containing the #! interpreter_name [optional_string] header line can execute. • The [EINVAL], [ENODEV], [ENOTOSS], and [EUNKNOWN] error values are an HP extension.
System Functions (e) execve(2) NAME execve - Executes a file using a pathname, an argv array, and an envp array LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execve( const char ∗ path, char ∗ const argv[ ], char ∗ const envp[ ]); PARAMETERS **environ Points to an array of character pointers to environment strings.
execve(2) OSS System Calls Reference Manual A successful execve( ) function call does not return, because the calling process image is overlaid by the new process image.
System Functions (e) execve(2) When the File Is Invalid If the process image file is not a valid executable object, or if the text file does not contain the header line, the execve( ) function call fails and errno is set to the value of [ENOEXEC].
execve(2) OSS System Calls Reference Manual the new process image are saved (as the saved-set-user ID and the saved-set-group ID) for use by the setuid( ) function. The _POSIX_SAVED_IDS flag is defined TRUE.
System Functions (e) execve(2) • Security group list • Job ancestor or GMOM • Unread system message index (PCBMCNT) This attribute assignment is different from the assignment made when creating a new process with Guardian procedures. • Outstanding incoming and outgoing message limits This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
execve(2) OSS System Calls Reference Manual • The PAID depends on whether the S_ISUID mode bit of the image file is set. If so, the PAID is based on the file owner ID. If not, the PAID is the same as for the caller. (The S_ISUID mode bit of the image file has no effect on the security group list.) • The MOM field for the new process depends on whether the calling process is named. If so, the MOM field for the new process is set to the caller’s ANCESTOR field.
System Functions (e) execve(2) [EINVAL] The new process image file is a binary executable file with invalid attributes. [ELOOP] Too many symbolic links were encountered in pathname resolution. [EMFILE] The maximum number of files is open. The process attempted to open more than the maximum number of file descriptors allowed for the process. The process file segment (PFS) of the new process might be smaller than that of the calling process.
execve(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • Guardian attributes are associated with the new OSS process. See Guardian Attributes under DESCRIPTION. • The contents of the st_atime field following a failed function call in which the file was found should not be depended upon for further processing.
System Functions (e) execvp(2) NAME execvp - Executes a file using a filename, an argv array, and **environ LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execvp( const char ∗ file, char ∗ const argv[ ]); PARAMETERS **environ Points to an array of character pointers to environment strings. The environment strings define the OSS environment for the new process.
execvp(2) OSS System Calls Reference Manual Entering the New Process When a program is executed as a result of a call to a function in the exec set of functions, it is entered as a function call as follows: int main( int argc, char ∗ argv[ ], char ∗ env[ ]); Here, the argc parameter is the argument count, the argv[ ] parameter is an array of character pointers to the arguments themselves, and env[ ] is a pointer to a character array listing the environment variables.
System Functions (e) execvp(2) • argv[0] is set to the string "sh". • argv[1] is set to the original value of the file parameter. • The remaining elements of argv[ ] are set to the original elements of argv[ ], starting with argv[1]. • The original value of argv[0] is discarded.
execvp(2) OSS System Calls Reference Manual User ID and Group ID If the set-user-ID mode bit of the new process image file is set (see the chmod(2) reference page), the effective user ID of the new process image is set to the owner ID of the new process image file. Similarly, if the set-group-ID mode bit of the new process image file is set, the effective group ID of the new process image is set to the group ID of the new process image file.
System Functions (e) execvp(2) • Processor on which the process executes • Home terminal • Job ID • DEFINE mode switch • Process access ID (PAID), unless the S_ISUID mode bit of the new image file is set • Security group list • Job ancestor or GMOM • Unread system message index (PCBMCNT) This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
execvp(2) OSS System Calls Reference Manual — The PIN of the calling process was unrestricted. If the PIN of the new process is restricted, then the PIN is in the range 0 through 254. • The creator access ID (CAID) is set to the process access ID (PAID) of the calling process. • The PAID depends on whether the S_ISUID mode bit of the image file is set. If so, the PAID is based on the file owner ID. If not, the PAID is the same as for the caller.
System Functions (e) execvp(2) • The new process image file, any library file, or script file denies execution permission. • The new process image file is not a regular file. [EAGAIN] System resources such as disk space, process control block (PCB) space, MAPPOOL space, stack space, or PFS space are temporarily inadequate. [EFAULT] An input address parameter is outside valid bounds limits. [EINVAL] The new process image file is a binary executable file with invalid attributes.
execvp(2) OSS System Calls Reference Manual Miscellaneous: environ(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • Guardian attributes are associated with the new OSS process. See Guardian Attributes under DESCRIPTION. • [ENOENT] is returned in errno if the environment variable PATH is not defined when the execvp( ) function is called.
System Functions (e) _exit(2) NAME _exit - Terminates a process LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include void _exit( int status); PARAMETERS status Indicates the status of the process.
_exit(2) OSS System Calls Reference Manual new controlling process. • If the exit of a process causes a process group to become orphaned, and if any member of the newly orphaned process group is stopped, then a SIGHUP signal followed by a SIGCONT signal is sent to each member of the orphaned process group. • Locks set by the fcntl( ) function are removed. Use From the Guardian Environment The _exit( ) function can be called from any Guardian process as well as from OSS processes.
Section 3. System Functions (f - i) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with f through i. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
fchmod(2) OSS System Calls Reference Manual NAME fchmod - Changes file-access permissions LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int fchmod( int filedes, mode_t mode); PARAMETERS filedes Specifies the file descriptor of an open file.
System Functions (f - i) fchmod(2) S_IXUSR Permits the file’s owner to execute the file (or to search the directory). S_IRWXG Permits the file’s group to read, write, and execute the file (or to search the directory). S_IRGRP Permits the file’s group to read the file. S_IWGRP Permits the file’s group to write to the file. S_IXGRP Permits the file’s group to execute the file (or to search the directory). S_IRWXO Permits others to read, write, and execute the file (or to search the directory).
fchmod(2) OSS System Calls Reference Manual Use From the Guardian Environment The fchmod( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (f - i) fchmod(2) [EPERM] The effective user ID does not match the ID of the owner of the file, and the calling process does not have super ID privilege. [EROFS] The file referred to by filedes resides on a read-only fileset. For all other error conditions, errno is set to the appropriate Guardian file-system error number. For more information about a specific Guardian file-system error, see the Guardian Procedure Errors and Messages Manual. RELATED INFORMATION Commands: chmod(1).
fchown(2) OSS System Calls Reference Manual NAME fchown - Changes the owner and group IDs of a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int fchown( int filedes, uid_t owner, gid_t group); PARAMETERS filedes Specifies a valid file descriptor.
System Functions (f - i) fchown(2) The _POSIX_CHOWN_RESTRICTED feature is ignored for files in the Guardian file system (that is, for files in /G). Use From the Guardian Environment The fchown( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory.
fchown(2) OSS System Calls Reference Manual [EPERM] The calling process does not have appropriate privileges. [EROFS] The file referred to by filedes resides on a read-only fileset. For all other error conditions, errno is set to the appropriate Guardian file-system error number. See the Guardian Procedure Errors and Messages Manual for more information about a specific Guardian file-system error. RELATED INFORMATION Commands: chgrp(1), chown(1).
System Functions (f - i) fcntl(2) NAME fcntl - Controls open file descriptors LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include #include /* optional except for POSIX.1 */ /* optional except for POSIX.
fcntl(2) F_GETFD OSS System Calls Reference Manual Gets the value of the file descriptor flags, defined in the fcntl.h header file, that are associated with the value of the filedes parameter. File descriptor flags are associated with a single file descriptor and do not affect other file descriptors that refer to the same file. The argument1 parameter or argument2 parameter is ignored. The value F_GETFD is invalid for an OSSTTY or Telserv terminal device.
System Functions (f - i) fcntl(2) The file access mode is not changed when F_SETFL is used. F_GETOWN Gets the process ID or process group ID currently receiving the SIGURG signal for a socket. A process group ID is returned as a negative value. A positive value indicates the process ID. The value F_GETOWN is invalid for these calls: F_SETOWN • Guardian use of OSS sockets is not supported. If this value is used in a call from the Guardian environment, the call fails, and errno is set to [ENOTOSS].
fcntl(2) OSS System Calls Reference Manual An exclusive lock prevents any other process from setting a shared lock or an exclusive lock on any portion of the protected area. A request for an exclusive lock fails if the file descriptor was not opened with write access. The flock structure describes the type (l_type field), starting offset (l_whence), relative offset (l_start), size (l_len), and process ID (l_pid) of the segment of the file to be affected.
System Functions (f - i) fcntl(2) ERRORS If any of these conditions occurs, the fcntl( ) function sets errno to the corresponding value: [EAGAIN] The request parameter is F_SETLK, the type of lock (l_type) is shared (F_RDLCK) or exclusive (F_WRLCK), and a segment of a file to be locked is already exclusive-locked by another process.
fcntl(2) [EIO] OSS System Calls Reference Manual • The request parameter is F_SETFL, and any file status flag other than O_NONBLOCK, O_APPEND, O_CREAT, O_EXCL, O_SYNC, or O_TRUNC is set. (Values set in the O_ACCMODE mask are ignored.) • The request parameter is F_SETOWN, and the filedes parameter does not specify a socket. • The call attempted to set an advisory record lock on a file that is not a regular file. An input or output error occurred.
System Functions (f - i) fcntl(2) RELATED INFORMATION Functions: creat(2), close(2), dup(2), dup2(2), exec(2), open(2), read(2), socket(2), tdm_execve(2), tdm_execvep(2), write(2). STANDARDS CONFORMANCE The fcntl( ) function does not return the errno value [EDEADLK]. The fcntl( ) function does not support the O_ASYNC flag. The POSIX standards leave some features to the implementing vendor to define.
fork(2) OSS System Calls Reference Manual NAME fork - Creates a new process LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t fork(void); DESCRIPTION The fork( ) function creates a new OSS process. The created process is referred to as the child and the caller as the parent.
System Functions (f - i) fork(2) • The child process has its own copy of the parent process’s file descriptors. However, each of the child’s file descriptors shares a common file pointer with the corresponding file descriptor of the parent process. • The child process does not inherit any file open created by a Guardian function or procedure call. • The child process does not inherit file locks. • The child process’s tms_utime, tms_stime, tms_cutime, and tms_cstime values are set to 0 (zero).
fork(2) OSS System Calls Reference Manual • Process access ID (PAID) • Security group list • Job ancestor or GMOM • Unread system message index count (PCBMCNT) This attribute assignment is different from the assignment made when creating a new process with Guardian procedures. • Outstanding incoming and outgoing message limits This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
System Functions (f - i) fork(2) Floating-Point Data If the parent process uses IEEE floating-point data, the child process inherits all of the floatingpoint register contents of the parent process and any computation started before the fork( ) function call completes in the child process. The contents of the status and control register are also inherited.
fork(2) OSS System Calls Reference Manual The following are HP extensions to the XPG4 Version 2 specification: • 3−20 The [EFAULT], [ENOTOSS], and [EUNKNOWN] error values are HP extensions.
System Functions (f - i) fstat(2) NAME fstat - Provides information about an open file LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
fstat(2) OSS System Calls Reference Manual For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket ID of device containing directory entry ID of device containing directory ID of special fileset for pipes ID of special fileset for sockets ID of device containing the fileset in which the socket file was created ID of device containing directory entry ID of device containing directory entry /dev/null /dev/tty st_ino File serial number (inode number).
System Functions (f - i) fstat(2) from the inode for the socket are returned for the permission bits. The access flags are also returned from the inode.
fstat(2) OSS System Calls Reference Manual st_gid For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the calling process User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed next.
System Functions (f - i) st_atime fstat(2) For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
fstat(2) OSS System Calls Reference Manual st_ctime Status change time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (f - i) fstat(2) Table 3−2.
fstat(2) OSS System Calls Reference Manual ERRORS If any of these conditions occurs, the fstat( ) function sets errno to the corresponding value: [EBADF] The filedes parameter is not a valid file descriptor. [EFAULT] The buffer parameter points to a location outside of the allocated address space of the process. [EFSBAD] The program attempted an operation involving a fileset with a corrupted fileset catalog. [EIO] An input or output error occurred.
System Functions (f - i) fstat(2) RELATED INFORMATION Functions: chmod(2), chown(2), link(2), mknod(2), open(2), pipe(2), utime(2). STANDARDS CONFORMANCE The HP implementation does not return the errno value [EOVERFLOW]. The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • For files other than regular disk files, the st_size field of the stat structure is set to 0 (zero). For directories, st_size is set to 4096.
fstatvfs(2) OSS System Calls Reference Manual NAME fstatvfs - Gets fileset information for an open file LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int fstatvfs( int filedes, struct statvfs *buffer); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the creat( ), dup( ), dup2( ), fcntl( ), or open( ) function.
System Functions (f - i) f_frsize f_blocks fstatvfs(2) For Contains Regular file Directory FIFO /dev/null Object in /G /G Terminal device file /E 4096 4096 4096 4096 4096 4096 4096 4096 Fundamental file system block size: For Contains Regular file Directory FIFO /dev/null Object in /G /G Terminal device file /E 4096 4096 4096 4096 4096 4096 4096 4096 Total number of blocks in fileset, in units of f_frsize: For Contains Regular file Number of blocks on all volumes ever used in the fileset.
fstatvfs(2) OSS System Calls Reference Manual For Contains Regular file Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks in the volume containing the object.
System Functions (f - i) f_ffree fstatvfs(2) For Contains Regular file Directory FIFO /dev/null Object in /G /G Terminal device file /E Number of inode numbers in the fileset. Number of inode numbers in the fileset. Number of inode numbers in the fileset. Number of inode numbers in the fileset. The value of ULONG_MAX. 0 0 0 Total number of free file serial numbers (inode numbers) in the fileset: For Contains Regular file Number of free inode numbers in the fileset.
fstatvfs(2) f_fsid OSS System Calls Reference Manual Fileset identifier: For Contains Regular file Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure.
System Functions (f - i) fstatvfs(2) Terminal device file /E 2 3 The content of the f_flag field can be tested with these symbolic values: ST_NOSUID This bit flag is set if the fileset does not allow the setuid bit to be set for its member files. ST_NOTRUNC This bit flag is set if the fileset does not truncate filenames. ST_RDONLY This bit flag is set if the fileset is mounted for read-only access.
fstatvfs(2) f_bminavail f_bmaxavail OSS System Calls Reference Manual Number of blocks free on the disk volume with the least space remaining: For Contains Regular file Directory FIFO /dev/null Object in /G /G Terminal device file /E Number of blocks. Number of blocks. Number of blocks. Number of blocks. Number of blocks.
System Functions (f - i) fstatvfs(2) [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [EWRONGID] One of these conditions occurred: • The process attempted an input or output operation through an operating system input/output process (such as a terminal server process) that has failed or is in the down state.
fsync(2) OSS System Calls Reference Manual NAME fsync - Writes modified data and file attributes to permanent storage LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int fsync( int filedes); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the accept( ), creat( ), dup( ), dup2( ), fcntl( ), open( ), pipe( ), socket( ), or socketpair( ) function.
System Functions (f - i) [ENXIO] fsync(2) No such device or address. An invalid device or address was specified during an input or output operation on a special file. One of these events occurred: • A device was specified that does not exist, or a request was made beyond the limits of the device. • The fileset containing the requestor’s current working directory or root directory is not mounted.
ftruncate(2) OSS System Calls Reference Manual NAME ftruncate - Changes file length LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int ftruncate( int filedes, off_t length); PARAMETERS filedes Specifies the descriptor of a file that must be open for writing. length Specifies the new length of the file in bytes.
System Functions (f - i) ftruncate(2) • [EIO] The value specified for the length parameter would cause the file to exceed the file size limit for the calling process. One of these conditions occurred: • The process is a member of a background process group attempting to read from its controlling terminal, the process is ignoring or blocking the SIGTTIN signal, or the process group is orphaned. • A physical I/O error occurred.
gamma_r(2) OSS System Calls Reference Manual NAME gamma_r - Computes the logarithm of the gamma function (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include double gamma_r ( double x, int *signgamp ); extern int signgam; PARAMETERS x Specifies a positive double value. signgamp Points to the sign of the gamma function.
System Functions (f - i) gamma_r(2) If the correct value would cause overflow, HUGE_VAL is returned. If the correct value would cause underflow, 0.0 (zero) is returned. ERRORS If the following condition occurs, the gamma_r( ) function sets errno to the corresponding value: [EDOM] The value of x is 0.0, (zero), a nonpositive integer, or negative infinity. RELATED INFORMATION Functions: exp(3), fp_class(3), gamma(3), isnan(3), lgamma(3), lgamma_r(2).
getegid(2) OSS System Calls Reference Manual NAME getegid - Gets the effective group ID LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ gid_t getegid(void); DESCRIPTION The getegid( ) function returns the effective group ID of the calling process.
System Functions (f - i) geteuid(2) NAME geteuid - Gets the effective user ID of the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ uid_t geteuid(void); DESCRIPTION The geteuid( ) function returns the effective user ID of the current process. RETURN VALUES The geteuid( ) function returns the requested user ID.
getgid(2) OSS System Calls Reference Manual NAME getgid - Gets the real group ID LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ gid_t getgid(void); DESCRIPTION The getgid( ) function returns the real group ID of the calling process.
System Functions (f - i) getgrent_r(2) NAME getgrent_r - Gets group information from the group database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct group *getgrent_r ( struct group *grp, char *buffer, size_t buflen ); PARAMETERS grp Points to a struct group structure allocated by the caller.
getgrent_r(2) OSS System Calls Reference Manual The gr_passwd field is provided for compatibility with some versions of UNIX, but it always contains a null string. NOTES The functions getgrnam_r( ) and getgrgid_r( ) should be used instead of this function, to ensure portability to future systems. RETURN VALUES The getgrent_r( ) function returns a pointer to a struct group if it successfully enumerates an entry; otherwise, it returns a null pointer and sets errno to indicate the specific error.
System Functions (f - i) getgrgid_r(2) NAME getgrgid_r - Gets group information from the group database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include int getgrgid_r ( gid_t gid , struct group *grp, char *buffer, size_t buflen, struct group **result ); PARAMETERS gid Specifies the group ID of the group for which information is to be retrieved.
getgrgid_r(2) OSS System Calls Reference Manual gr_passwd This field is not used by the system, so its value is meaningless. gr_gid The group ID of the group. gr_mem The members of the group. Open System Services supports the following POSIX.1-compliant group declaration: struct group { char *gr_name; char *gr_passwd; gid_t gr_gid; char **gr_mem; }; The gr_passwd field is provided for compatibility with some versions of UNIX, but it always contains a null string.
System Functions (f - i) getgrnam_r(2) NAME getgrnam_r - Gets group information from the group database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
getgrnam_r(2) OSS System Calls Reference Manual gr_gid The group ID of the group. gr_mem The members of the group. Open System Services supports the following POSIX.1-compliant group declaration: struct group { char *gr_name; char *gr_passwd; gid_t gr_gid; char **gr_mem; }; The gr_passwd field is provided for compatibility with some versions of UNIX, but it always contains a null string. RETURN VALUES Upon successful completion, the getgrnam_r( ) function returns 0 (zero).
System Functions (f - i) getgroups(2) NAME getgroups - Gets the group list of the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include int getgroups( int gidsetsize, gid_t grouplist [ ]); PARAMETERS gidsetsize Specifies the number of entries that can be stored in the array pointed to by the grouplist parameter.
gethostbyaddr_r(2) OSS System Calls Reference Manual NAME gethostbyaddr_r - Gets a network host entry by address (AF_INET only) (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (f - i) gethostbyaddr_r(2) NOTES Use the endhostent( ) function to close the /etc/hosts file. RETURN VALUES Upon successful completion of gethostbyaddr_r( ), a pointer to a hostent structure is returned if the address was found, and a null pointer if the address was not found. If the call to gethostbyaddr_r( ) fails, a null pointer is returned.
gethostbyname_r(2) OSS System Calls Reference Manual NAME gethostbyname_r - Gets a host entry by name (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include [extern h_errno;] struct hostent *gethostbyname_r ( const char *name, struct hostent *host, char *buffer, int buflen, int *h_errnop ); PARAMETERS name Specifies the network name or alias.
System Functions (f - i) gethostbyname_r(2) RETURN VALUES Upon successful completion, gethostbyname_r( ) returns a pointer to a hostent structure if the entry was found, and a null pointer if the entry was not found. If the call to gethostbyname_r( ) fails, a null pointer is returned. ERRORS If any of the following conditions occurs, the gethostbyname_r( ) function sets h_errno to the value that corresponds to the condition: HOST_NOT_FOUND The name you have used is not a valid hostname or alias.
gethostent_r(2) OSS System Calls Reference Manual NAME gethostent_r - Gets the next entry in the network host database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct hostent *gethostent_r ( struct hostent *host, char *buffer, int buflen, int *h_errnop ); PARAMETERS host Points to a struct hostent structure allocated by the caller.
System Functions (f - i) gethostent_r(2) NO_DATA | NO_ADDRESS The requested name is valid but no associated address was found. Another type of name server request might succeed. In addition, if the following condition occurs, the gethostent_r( ) function sets errno to the corresponding value: [ERANGE] Insufficient storage was supplied via buffer and buflen to contain the data to be referenced by the resulting hostent structure. /etc/hosts The Internet network hostname database.
gethostname(2) OSS System Calls Reference Manual NAME gethostname - Gets the name of the local host LIBRARY G-series native OSS processes: /G/system/sysnn/zinetsrl H-series OSS processes: /G/system/zdllnnn/zinetdll SYNOPSIS #include int gethostname( char *address, int address_len); PARAMETERS address Returns the address of an array of bytes where the host name is stored. If sufficient space is provided, the returned address parameter is NULL terminated.
System Functions (f - i) getlogin(2) NAME getlogin - Gets login name LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include char *getlogin(void); DESCRIPTION The getlogin( ) function returns the login name associated with the current session. The login name can be a username or a user alias.
getlogin_r(2) OSS System Calls Reference Manual NAME getlogin_r - Gets login name (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int getlogin_r ( char *name, size_t namesize ); PARAMETERS name Points to the buffer where the login name is stored. namesize Specifies the size of the buffer passed in bytes.
System Functions (f - i) getnetbyaddr_r(2) NAME getnetbyaddr_r - Gets a network entry by address (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
getnetbyaddr_r(2) [ERANGE] OSS System Calls Reference Manual Insufficient storage was supplied via buffer and buflen to contain the data to be referenced by the resulting netent structure. FILES /etc/networks The Internet network name database file. RELATED INFORMATION Functions: getnetent(3), getnetent_r(2), getnetbyaddr(3), getnetbyname(3), getnetbyname_r(2), setnetent(3), endnetent(3). Files: networks(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification.
System Functions (f - i) getnetbyname_r(2) NAME getnetbyname_r - Gets a network entry by name (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct netent *getnetbyname_r ( const char *name, struct netent *ret, char *buffer, int buflen ); PARAMETERS name Specifies the network name or alias. ret Points to a struct netent structure allocated by the caller.
getnetbyname_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: getnetent(3), getnetent_r(2), getnetbyaddr(3), getnetbyaddr_r(2), getnetbyname(3), setnetent(3), endnetent(3). Files: networks(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.
System Functions (f - i) getnetent_r(2) NAME getnetent_r - Gets the next entry in the network database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct netent *getnetent_r ( struct netent *ret, char *buffer, int buflen ); PARAMETERS ret Points to a struct netent structure allocated by the caller.
getnetent_r(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference 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.
System Functions (f - i) getpeername(2) NAME getpeername - Gets the name of the peer socket LIBRARY G-series native OSS processes: /G/system/sysnn/zinetsrl H-series OSS processes: /G/system/zdllnnn/zinetdll SYNOPSIS #include int getpeername( int socket, struct sockaddr *address, size_t *address_len ); PARAMETERS socket Specifies the open file descriptor of the socket. address Points to a sockaddr structure, where the address of the peer socket is returned.
getpeername(2) OSS System Calls Reference Manual • The connection was forcibly closed by the peer socket. The socket can only be closed. [EFAULT] A user-supplied memory buffer cannot be accessed or written. [EINVAL] The socket has been shut down. [ENOBUFS] There were not enough system resources available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed.
System Functions (f - i) getpgid(2) NAME getpgid - Gets the process group ID for a specified OSS process LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include pid_t getpgid( pid_t pid); PARAMETERS pid Specifies the process ID of the target process. If the specified value is 0 (zero), the target process is the calling process.
getpgrp(2) OSS System Calls Reference Manual NAME getpgrp - Gets the process group ID of the calling process LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t getpgrp(void); DESCRIPTION The getpgrp( ) function returns the process group ID of the calling process. Use From the Guardian Environment Calls to getpgrp( ) from Guardian processes are not successful.
System Functions (f - i) getpid(2) NAME getpid - Gets the OSS process ID LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t getpid(void); DESCRIPTION The getpid( ) function returns the OSS process ID of the calling process. Use From the Guardian Environment Calls to getpid( ) from Guardian processes are not successful.
getppid(2) OSS System Calls Reference Manual NAME getppid - Gets the parent OSS process ID LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t getppid(void); DESCRIPTION The getppid( ) function returns the parent OSS process ID of the calling process.
System Functions (f - i) getpriority(2) NAME getpriority - Gets the OSS process scheduling priority LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int getpriority( int which, id_t who); PARAMETERS which Specifies the symbolic value for the source of the nice value to be returned. The following symbolic values defined in the sys/resource.
getpriority(2) OSS System Calls Reference Manual [ENOTOSS] The calling process is not an OSS process. The requested operation is not supported from the Guardian environment. [ESRCH] No process was located using the which and who parameter values specified. RELATED INFORMATION Functions: nice(2). STANDARDS CONFORMANCE The following is an HP extension to the XPG4 Version 2 specification: • 3−76 The function can return the errno value [ENOTOSS].
System Functions (f - i) getprotobyname_r(2) NAME getprotobyname_r - Gets a protocol entry by name (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct protoent *getprotobyname_r ( const char *name, struct protoent *ret, char *buffer, int buflen ); PARAMETERS name Specifies the protocol name or alias. ret Points to a struct protoent structure allocated by the caller.
getprotobyname_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: getprotobyname(3), getprotobynumber(3), getprotobynumber_r(2), getprotoent(3), getprotoent_r(2), setprotoent(3), endprotoent(3). Files: protocols(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (f - i) getprotobynumber_r(2) NAME getprotobynumber_r - Gets a protocol entry by number (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct protoent *getprotobynumber_r ( int num, struct protoent *ret, char *buffer, int buflen ); PARAMETERS num Specifies the protocol number. ret Points to a struct protoent structure allocated by the caller.
getprotobynumber_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: getprotobyname(3), getprotobyname_r(2), getprotobynumber(3), getprotoent(3), getprotoent_r(2), setprotoent(3), endprotoent(3). Files: protocols(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (f - i) getprotoent_r(2) NAME getprotoent_r - Gets the next protocol entry (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct protoent *getprotoent_r ( struct protoent *ret, char *buffer, int buflen ); PARAMETERS ret Points to a struct protoent structure allocated by the caller.
getprotoent_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: getprotobynumber(3), getprotobynumber_r(2), getprotobyname(3), getprotobyname_r(2), getprotoent(3), setprotoent(3), endprotoent(3). Files: protocols(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (f - i) getpwent_r(2) NAME getpwent_r - Gets user attribute information from the user database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct passwd *getpwent_r ( struct passwd *ret, char *buffer, size_t buflen ); PARAMETERS ret Points to a struct passwd structure allocated by the caller.
getpwent_r(2) OSS System Calls Reference Manual pw_shell The initial program for the user. The pw_passwd, pw_age, pw_comment, and pw_gecos fields are provided for compatibility with some versions of UNIX, but these fields always contain null strings. Database Structure and Access Traditional UNIX implementations access user and group information by sequentially reading unstructured files.
System Functions (f - i) getpwnam_r(2) NAME getpwnam_r - Gets user attribute information from the user database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
getpwnam_r(2) OSS System Calls Reference Manual pw_gid The group ID of the primary group of the user. pw_age The password aging string (not returned). pw_comment Comment string (not returned). pw_gecos Personal information about the user (not returned). pw_dir The home directory of the user. pw_shell The initial program for the user. The pw_passwd, pw_age, pw_comment, and pw_gecos fields are provided for compatibility with some versions of UNIX, but these fields always contain null strings.
System Functions (f - i) [ERANGE] getpwnam_r(2) Insufficient storage was supplied via buffer and buflen to contain the data to be referenced by the resulting passwd structure. RELATED INFORMATION Functions: endpwent(3), getpwent(3), getpwent_r(2), getpwent(3), getpwnam(3), getpwuid(3), getpwuid_r(2), setpwent(3). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
getpwuid_r(2) OSS System Calls Reference Manual NAME getpwuid_r - Gets user attribute information from the user database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (f - i) getpwuid_r(2) pw_uid The user ID of the user. pw_gid The group ID of the primary group of the user. pw_age The password aging string (not returned). pw_comment Comment string (not returned). pw_gecos Personal information about the user (not returned). pw_dir The home directory of the user. pw_shell The initial program for the user.
getpwuid_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: endpwent(3), getpwent(3), getpwent_r(2), getpwnam(3), getpwnam_r(2), getpwuid(3), setpwent(3). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference 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.
System Functions (f - i) getservbyname_r(2) NAME getservbyname_r - Gets a network service entry by name (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct servent *getservbyname_r ( const char *name, const char *proto, struct servent *ret, char *buffer, int buflen ); PARAMETERS name Specifies the service name or the service alias name.
getservbyname_r(2) OSS System Calls Reference Manual FILES /etc/services This is the Internet network service-name database. RELATED INFORMATION Functions: getservbyname(3), getservbyport(3), getservbyport_r(2), getservent(3), getservent_r(2), setservent(3), endservent(3). Files: services(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (f - i) getservbyport_r(2) NAME getservbyport_r - Gets a network service entry by port number (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct servent *getservbyport_r ( int port, const char *proto, struct servent *ret, char *buffer, int buflen ); PARAMETERS port Specifies the port number for the service, in network-byte order.
getservbyport_r(2) OSS System Calls Reference Manual FILES /etc/services The Internet network service name database file. RELATED INFORMATION Functions: getservbyname(3), getservebyname_r(2), getservbyport(3), getservent(3), getservent_r(2), setservent(3), endservent(3). Files: services(4). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (f - i) getservent_r(2) NAME getservent_r - Gets the next entry from the network services database (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct servent *getservent_r ( struct servent *ret, char *buffer, int buflen ); PARAMETERS ret Points to a struct servent structure allocated by the caller.
getservent_r(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference 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.
System Functions (f - i) getsockname(2) NAME getsockname - Gets the locally bound name of a socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int getsockname( int socket, struct sockaddr *address, size_t *address_len ); PARAMETERS socket Specifies the file descriptor of the socket. address Points to a sockaddr structure, where the locally bound address of the specified socket is returned.
getsockname(2) OSS System Calls Reference Manual [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The socket can only be closed. [EFAULT] A user-supplied memory buffer cannot be accessed or written. [EINVAL] The socket has been shut down.
System Functions (f - i) getsockopt(2) NAME getsockopt - Gets socket options LIBRARY G-series native OSS processes: /G/system/sysnn/zinetsrl H-series OSS processes: /G/system/zdllnnn/zinetdll SYNOPSIS #include [#include ] Required for IP protocol level [#include ] Required for TCP protocol level int getsockopt( int socket, int level, int option_name, void *option_value, size_t *option_len ); PARAMETERS socket Specifies the file descriptor for the socket.
getsockopt(2) OSS System Calls Reference Manual • -1 to indicate that the default value should be used. IPV6_MULTICAST_LOOP Indicates that the host belongs to the multicast group that it is sending to, and a copy of the datagram should be sent by loopback to the originating host. IPV6_UNICAST_HOPS Indicates the hop limit for outbound unicast UDP datagrams. The limit is an int that is either: • Between 0 and 255 to indicate the maximum number of hops allowed.
System Functions (f - i) getsockopt(2) SO_BROADCAST Reports whether transmission of broadcast messages is supported. This option returns an int value in the buffer pointed to by the option_value parameter. SO_DEBUG Reports whether debugging information is being recorded. This option returns an int value in the buffer pointed to by the option_value parameter.
getsockopt(2) OSS System Calls Reference Manual SO_SNDBUF Reports the send buffer size in bytes. This option returns an int value in the buffer pointed to by the option_value parameter. SO_TYPE Reports the socket type in a form that can be tested against a symbolic value such as SOCK_DGRAM or SOCK_STREAM. This option returns an int value in the buffer pointed to by the option_value parameter.
System Functions (f - i) getsockopt(2) DESCRIPTION The getsockopt( ) function allows an application program to query socket options. The calling program specifies the file descriptor, the option, and a place to store the requested information. The operating system gets the socket option information from its internal data structures and passes the requested information back to the calling program.
getsockopt(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The HP implementation does not: • Implement the SO_LINGER option for AF_UNIX sockets. • Return the errno value [ENOSR]. The following are HP extensions to the XPG4 specification: 3−104 • The errno value [ECONNRESET] can be returned when the transport provider process is unavailable. • The SO_REUSEPORT option is supported.
System Functions (f - i) gettimeofday(2) NAME gettimeofday - Gets date and time LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int gettimeofday( struct timeval *tp, struct timezone *tzp); PARAMETERS tp Points to a timeval structure, defined in the sys/time.h file. The timeval structure contains the current time when the call is completed.
gettimeofday(2) OSS System Calls Reference Manual ERRORS If any of the following conditions occurs, the gettimeofday( ) function sets errno to the corresponding value: [EFAULT] A parameter points to an invalid address. [ENOTOSS] The calling process is not an OSS process. The requested operation is not supported from the Guardian environment. RELATED INFORMATION Functions: ctime(3), strftime(3). Commands: date(1).
System Functions (f - i) getuid(2) NAME getuid - Gets the the real user ID of the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ uid_t getuid(void); DESCRIPTION The getuid( ) function returns the real user ID of the current process.
gmtime_r(2) OSS System Calls Reference Manual NAME gmtime_r - Converts time since the Epoch to broken-down Coordinated Universal Time (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct tm *gmtime_r ( const time_t *timer, struct tm *result ); PARAMETERS timer Points to a variable that specifies a time value in seconds.
System Functions (f - i) gmtime_r(2) ERRORS No error values are returned. This function does not set the errno variable. RELATED INFORMATION Functions: asctime(3), asctime_r(2), ctime(3), ctime_r(2), difftime(3), getenv(3), localtime(3), localtime(2), mktime(3), strftime(3), time(3), tzset(3), utime(3). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
ioctl(2) OSS System Calls Reference Manual NAME ioctl - Controls device files LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include int ioctl( int filedes, int request, / * arg */ . . . ); The ellipsis (. . .) indicates that the function is variable. PARAMETERS filedes Specifies the open file descriptor of the tty device or socket.
System Functions (f - i) ioctl(2) SIOCSIFADDR Sets the interface address. The data structure pointed to by arg is of type ifreq. Returns the error [EOPNOTSUPP]. SIOCSIFDSTADDR Sets the destination address on a point-to-point interface. The data structure pointed to by arg is of type ifreq. Returns the error [EOPNOTSUPP]. SIOCSIFFLAGS Sets the interface flags. The data structure pointed to by arg is of type ifreq. Returns the error [EOPNOTSUPP].
ioctl(2) OSS System Calls Reference Manual TIOCSWINSZ Causes the values stored in the winsize structure pointed to by arg to be sent to the Telserv window identified by the filedes parameter.
System Functions (f - i) ioctl(2) [ENOTSUP] The request parameter specifies an operation that is not supported on the device specified by the filedes parameter. [ENOTTY] The device parameter is not associated with a character-special device, or the specified request does not apply to the type of object that descriptor device references. [ENXIO] No such device or address exists. [EOPNOTSUPP] Operation not supported on socket.
Section 4. System Functions (k - m) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with k through m. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
kill(2) OSS System Calls Reference Manual NAME kill - Sends a signal to a process or group of processes LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int kill( pid_t pid, int signal); PARAMETERS pid Specifies the process or group of processes to be sent a signal. signal Specifies the signal.
System Functions (k - m) kill(2) The POSIX.1 standard leaves unspecified the set of system processes that does not receive a signal when the kill( ) function is called with pid equal to 0, -1, or a negative number less than -1. Applications in the HP implementation should therefore not depend on which system processes receive signals. Safeguard Considerations HP recommends that users not use Safeguard protection on OSS processes.
kill(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the kill( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, errno is set to indicate the error, and no signal is sent. ERRORS If any of the following conditions occurs, the kill( ) function sets errno to the corresponding value: [EINVAL] The value in the signal parameter is an invalid or unsupported signal number. [ENOTOSS] The calling process was not an OSS process.
System Functions (k - m) lchmod(2) NAME lchmod - Changes file-access permissions LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int lchmod( const char *path, mode_t mode); PARAMETERS path Specifies the full pathname of the file.
lchmod(2) OSS System Calls Reference Manual S_IWUSR Permits the file’s owner to write to the file. S_IXUSR Permits the file’s owner to execute the file (or to search the directory). S_IRWXG Permits the file’s group to read, write, and execute the file (or to search the directory). S_IRGRP Permits the file’s group to read the file. S_IWGRP Permits the file’s group to write to the file. S_IXGRP Permits the file’s group to execute the file (or to search the directory).
System Functions (k - m) lchmod(2) Use From the Guardian Environment The lchmod( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
lchmod(2) [ENOROOT] OSS System Calls Reference Manual One of these conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state. • The current root fileset for the specified file is unavailable. The OSS name server for the fileset might have failed. • The specified file is on a remote HP NonStop node, and communication with the remote name server has been lost. [ENOTDIR] A component, other than the last part, of the path parameter is not a directory.
System Functions (k - m) lchown(2) NAME lchown - Changes the owner and group IDs of a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
lchown(2) OSS System Calls Reference Manual The _POSIX_CHOWN_RESTRICTED feature is ignored for files in the Guardian file system (that is, for files in /G). Use From the Guardian Environment The lchown( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory.
System Functions (k - m) [ENOROOT] lchown(2) • The path parameter is an empty string. • The path parameter specifies a file in the Guardian file system (in /G) but cannot be mapped to a valid Guardian filename. • The path parameter names a symbolic link, but the file to which it refers does not exist. • The path parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost.
lchown(2) OSS System Calls Reference Manual HP extensions to the XPG4 Version 2 specification are: • 4−12 The errno values [EFAULT], [EFSBAD], [EIO], [ENOROOT], [ENXIO], and [EOSSNOTRUNNING] can be returned.
System Functions (k - m) lgamma_r(2) NAME lgamma_r - Computes the logarithm of the gamma function (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include double lgamma_r ( double x, int *signgamp ); extern int signgam; PARAMETERS x Specifies a positive double value. signgamp Points to the sign of the lgamma_r( ) function.
lgamma_r(2) OSS System Calls Reference Manual If the correct value would cause overflow, HUGE_VAL is returned. If the correct value would cause underflow, 0.0 (zero) is returned. ERRORS If the following condition occurs, the lgamma_r( ) function sets errno to the corresponding value: [EDOM] The value of x is 0.0 (zero), negative infinity, or a nonpositive integer. RELATED INFORMATION Functions: exp(3), fp_class(3), gamma(3), gamma_r(2), isnan(3), lgamma(2).
System Functions (k - m) link(2) NAME link - Creates an additional directory entry for an existing file on the current fileset LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int link( const char *path1, const char *path2); PARAMETERS path1 Points to the pathname of an existing file. If any component of the path1 parameter refers to a symbolic link, the link is traversed and pathname resolution continues.
link(2) OSS System Calls Reference Manual Use From the Guardian Environment The link( ) function is one of a set of functions that have the following effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (k - m) link(2) • A component of the pathname pointed to by the path1 parameter • A component of the pathname pointed to by the path2 parameter • The intermediate result of pathname resolution when a symbolic link is part of the path1 or path2 parameter The pathconf( ) function can be called to obtain the applicable limits. [ENOENT] [ENOROOT] One of the following is true: • The file specified by the path1 parameter does not exist.
link(2) OSS System Calls Reference Manual RELATED INFORMATION Commands: ln(1). Functions: unlink(2). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • The link( ) function is not supported between filesets. • The link( ) function is not supported for directories.
System Functions (k - m) listen(2) NAME listen - Listens for socket connections and limits the backlog of incoming connections LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int listen( int socket, int backlog ); PARAMETERS socket Specifies the file descriptor for the socket. backlog Specifies the maximum number of outstanding connections.
listen(2) OSS System Calls Reference Manual [EDESTADDRREQ] The socket is not bound to a local address, and the protocol does not support listening on an unbound socket. [EINVAL] One of the following conditions occurred: • The socket is already connected. • The socket has been shut down. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time may succeed. [ENOMEM] Required memory resources were not available. A retry at a later time may succeed.
System Functions (k - m) localtime_r(2) NAME localtime_r - Converts time since the Epoch to broken-down local time (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include struct tm *localtime_r ( const time_t *timer, struct tm *result ); PARAMETERS timer Points to a variable that specifies a time value in seconds. result Points to the struct tm where the converted time is stored.
localtime_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: asctime(3), asctime_r(2), ctime(3), ctime_r(2), difftime(3), getenv(3), gmtime(3), gmtime_r(2), mktime(3), strftime(3), time(3), tzset(3), utime(3). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.
System Functions (k - m) lseek(2) NAME lseek - Sets file offset for read or write operation LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
lseek(2) OSS System Calls Reference Manual [EINVAL] [EISDIR] One of these conditions exists: • The whence parameter is an invalid value, or the resulting file offset would be an invalid value (that is, a value greater than 2 gigabytes or less than 0 [zero]). • The filedes parameter refers to a file (other than a pipe, FIFO, or directory) on which seeking cannot be performed. The filedes parameter refers to an OSS directory.
System Functions (k - m) lstat(2) NAME lstat - Provides information about a symbolic link or any file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int lstat( const char *path, struct stat *buffer); PARAMETERS path Points to the pathname of a file.
lstat(2) OSS System Calls Reference Manual pointed to by path. For a symbolic link, the lstat( ) function sets the st_size field of the stat structure to the length in characters of the link name used as the pathname pointed to by path (not including the null terminator). The lstat( ) function also sets the st_mode field to indicate the file type. The lstat( ) function updates any time-related fields associated with the file before writing into the stat structure, unless it is a read-only fileset.
System Functions (k - m) st_mode lstat(2) File mode. The following bits are ORed into the st_mode field: S_IFMT File type. This field can contain one of the following values: S_IFCHR Character special file. S_IFDIR Directory. S_IFIFO FIFO. S_IFREG Regular file. S_IFSOCK Socket. For an AF_UNIX socket, the user permissions from the inode for the socket are returned for the permission bits. The access flags are also returned from the inode.
lstat(2) OSS System Calls Reference Manual st_gid For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed in the following table. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (k - m) st_atime lstat(2) For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed in the following table. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
lstat(2) OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Time of the last file status change Time of the last file status change Time of the last file status change Value retrieved from the inode Current time Composite value of the times of all openers of the file For the /E entry of the local node, the value is the time of the most recent mounting of the root fileset.
System Functions (k - m) lstat(2) Table 4−1.
lstat(2) OSS System Calls Reference Manual Use From the Guardian Environment The lstat( ) function can be used by a Guardian process when the process has been compiled using the #define _XOPEN_SOURCE_EXTENDED 1 feature test macro or an equivalent compiler command option.
System Functions (k - m) lstat(2) • path points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The specified pathname points to the name of a Guardian process that is not of subtype 30. • The path parameter specifies a file on a remote HP NonStop node but communication with the remote node has been lost. [ENOROOT] The program attempted an operation while the root fileset was unavailable.
mkdir(2) OSS System Calls Reference Manual NAME mkdir - Creates a directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int mkdir( const char *path, mode_t mode); PARAMETERS path Points to the pathname for the new directory.
System Functions (k - m) mkdir(2) The mkdir( ) function cannot create a directory named /dev, /dev/tty, or /dev/null in the root directory of the OSS file system. The mkdir( ) function cannot create a directory named lost+found in the root directory of an OSS fileset. If these directories are missing from the system, such a function call fails and sets errno to the value [EPERM]. When these directories already exist (the normal case), errno is set to [EEXIST].
mkdir(2) OSS System Calls Reference Manual ERRORS If any of the following conditions occurs, the directory is not created and the mkdir( ) function sets errno to the corresponding value: [EACCES] Creating the requested directory requires writing in a directory with a mode that denies write permission, or search permission is denied on the parent directory of the directory to be created. [EEXIST] The named file already exists. [EFAULT] The path parameter is an invalid address.
System Functions (k - m) mkdir(2) [ENOSPC] The fileset does not contain enough space to hold the contents of the new directory or to extend the parent directory of the new directory. [ENOTDIR] A component of the pathname prefix is not a directory. [ENXIO] The fileset containing the client’s current working directory or root directory is not mounted. [EOSSNOTRUNNING] The program attempted an operation on an object in the OSS environment while a required system process was not running.
mknod(2) OSS System Calls Reference Manual NAME mknod - Creates a file or assigns a pathname to a character special file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int mknod( const char *path, mode_t mode, dev_t device); PARAMETERS path Specifies the pathname of the new file.
System Functions (k - m) device mknod(2) S_ISGID Set the group ID of the file upon execution of the file S_ISUID Set the user ID of the file upon execution of the file S_ISVTX Restrict the deletion of files in a directory (ignored for other file types) S_IWGRP Write access by members of the group list S_IWOTH Write access by others S_IWUSR Write access by the owner of the file S_IXGRP Execute (search) access by members of the group list S_IXOTH Execute (search) access by others S_IXUSR E
mknod(2) OSS System Calls Reference Manual Use From the Guardian Environment The mknod( ) function can be used by a Guardian process when the process has been compiled using the #define _XOPEN_SOURCE_EXTENDED 1 feature-test macro or an equivalent compiler command option.
System Functions (k - m) mknod(2) [EEXIST] The named file exists. [EFAULT] The path parameter points outside the process’s allocated address space. [EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt. [EINVAL] One of the following conditions exists: • The value S_IFBLK was specified for the mode parameter. • A value other than 0 (zero) was specified for the device parameter when a value other than S_IFCHR was specified for the mode parameter.
mknod(2) OSS System Calls Reference Manual [ENOTDIR] A component of the pathname prefix is not a directory. [ENXIO] The fileset containing the client’s working directory or effective root directory is not mounted. [EOSSNOTRUNNING] The program attempted an operation on an object in the OSS environment while a required system process was not running.
System Functions (k - m) msgctl(2) NAME msgctl - Performs message control operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int msgctl( int msqid, int cmd, struct msqid_ds *buf); PARAMETERS msqid Specifies the message queue identifier. cmd Specifies the type of operation.
msgctl(2) OSS System Calls Reference Manual IPC_STAT buf Queries the message queue identifier by copying the contents of its associated msqid_ds data structure into the structure specified by the buf parameter. Specifies the address of a msqid_ds structure. This structure is used only with the IPC_STAT and IPC_SET values of the cmd parameter. With IPC_STAT, the results of the query are copied to this structure.
System Functions (k - m) msgctl(2) • All processes for the relevant message server have failed. • The message queue corresponding to the value specified as the msqid parameter has been removed from the system. [EMSGQNOTRUNNING] The message queue server associated with the message queue identifier is not running. [ENOTOSS] The calling process is not an OSS process. The requested operation is not supported from the Guardian environment.
msgget(2) OSS System Calls Reference Manual NAME msgget - Creates or returns the identifier for a message queue LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int msgget( key_t key, int msgflg); PARAMETERS key Specifies the key that identifies the message queue. The IPC_PRIVATE key can be used to ensure the return of a new (unused) message queue identifier.
System Functions (k - m) • msgget(2) The msg_ctime field is set to the current time. This field is updated when any of the following events occur: — The message queue identifier is created. — The message queue identifier is removed. • The msg_qbytes field is set to the system limit. The message queue identifier is used for the following purposes: • It identifies a specific message server. • It allows detection of references to a previously removed message queue.
msgget(2) OSS System Calls Reference Manual ERRORS If any of the following conditions occurs, the msgget( ) function sets errno to the value that corresponds to the condition. [EACCES] A message queue identifier exists for the key parameter but operation permission, which is specified by the low-order nine bits of the msgflg parameter, is not granted. [EEXIST] A message queue identifier exists for the key parameter, and both IPC_CREAT and IPC_EXCL are set.
System Functions (k - m) msgrcv(2) NAME msgrcv - Receives a message from a message queue LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int msgrcv( int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg); PARAMETERS msqid Specifies the identifier of the message queue from which to read a message. msgp Specifies a pointer to the msgbuf structure that is to receive the message.
msgrcv(2) OSS System Calls Reference Manual < 0 (negative) The process receives the first message of the lowest type on the queue. To qualify as the lowest type, a message’s type must be less than or equal to the absolute value of the msgtyp parameter. The msgflg parameter specifies the action that the system should take if the queue does not contain a message of the requested type.
System Functions (k - m) msgrcv(2) ERRORS If any of the following conditions occurs, the msgrcv( ) function sets errno to the value that corresponds to the condition. [E2BIG] The number of bytes to be received in the mtext field is greater than the value of the msgsz parameter and the MSG_NOERROR flag is used in the msgflg parameter. [EACCES] The calling process does not have read permission for the specified message queue.
msgsnd(2) OSS System Calls Reference Manual NAME msgsnd - Sends a message to a message queue LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int msgsnd( int msqid, const void *msgp, size_t msgsz, int msgflg); PARAMETERS msqid Specifies the identifier of the message queue in which to place the message. The identifier is typically returned by a previous call to the msgget( ) function.
System Functions (k - m) msgsnd(2) — The process catches a signal. In this case, the message is not sent and the process resumes execution as directed by a sigaction( ) function call. If the msgsnd( ) function finishes successfully, the system updates the msqid_ds structure associated with the msqid parameter. Specifically, it does the following: • Increments the value in the msg_qnum field by 1. • Increments the value in the msg_cbytes field by the message text size.
msgsnd(2) OSS System Calls Reference Manual [EINVAL] One of the following conditions is true: • The msqid parameter does not specify a valid message queue identifier. • The value of the mtype field is less than 1. • The value of the msgsz parameter is less than 0 (zero) or greater than the system-defined limit. • All processes for the relevant message server have failed. [EMSGQNOTRUNNING] The message queue server associated with the message queue identifier is not running.
Section 5. System Functions (n - p) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with n through p. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
nice(2) OSS System Calls Reference Manual NAME nice - Changes the scheduling priority of the calling process LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int nice( int increment); PARAMETERS increment Specifies a value that is added to the current nice value of the calling process.
System Functions (n - p) nice(2) If the sum of the old nice value and the increment is • less than 0 (zero), then the new nice value is 0 (zero). • greater than 39, then the new nice value is 39 because the current value of 2*NZERO -1 is 39. Refer to NOTES for a description of the relative priorities of Guardian and OSS processes. Use From the Guardian Environment The nice( ) function can be used from the Guardian environment.
open(2) OSS System Calls Reference Manual NAME open - Opens a file for reading or writing, creates a regular file in the OSS environment LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include #include /* optional except for POSIX.1 */ /* optional except for POSIX.
System Functions (n - p) open(2) DESCRIPTION The open( ) function establishes a connection between the file indicated by the path parameter and the returned file descriptor. The opened file descriptor is used by subsequent I/O functions, such as read( ) and write( ), to access that file. The returned file descriptor is the lowest-numbered file descriptor not previously open for that process. A corresponding Guardian environment file number is also assigned.
open(2) O_EXCL OSS System Calls Reference Manual Open the file in exclusive access mode. If the file exists and the O_EXCL and O_CREAT flags are set, the open fails. If the file exists and the O_EXCL flag is set and the O_CREAT flag is not set, the open succeeds. O_NOCTTY Open the file but not as a controlling terminal. If the path parameter identifies a terminal device, this flag ensures that the terminal device does not become the controlling terminal for the process.
System Functions (n - p) open(2) • For a dynamic window, the open operation is allowed only if a connection is already established. Calling the open( ) function with the O_NONBLOCK flag is supported for OSSTTY terminal devices (ztty). OSSTTY devices support only three static windows, one each for #stdin, #stdout, and #stderr. O_SYNC Open for synchronized update. If set, updates and writes to regular files are synchronous updates. This flag is ignored for files that are not regular files.
open(2) OSS System Calls Reference Manual • If the O_NONBLOCK flag is set, the open( ) function returns without waiting for the device to be ready or available. Subsequent behavior of the device is device-specific. When opening a directory, the open fails, and errno is set to [EISDIR], if either of these conditions is true: • The directory is /E or /G (the Guardian file system) or a directory within /G.
System Functions (n - p) open(2) — A structured file — A file administered through the Storage Management Foundation (SMF) — Any file or device of any other type not described here fails with errno set, usually to [EINVAL]. An attempt to open a volume, a subvolume, or a process other than a TTY simulation process (/G/vol, /G/vol/subvol, or /G/process, respectively) fails with errno set to [EISDIR].
open(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the function returns the file descriptor, a nonnegative integer. Otherwise, the value -1 is returned, and errno is set to indicate the error. ERRORS If any of these conditions occurs, the function sets errno to the corresponding value: [EACCES] One of these conditions exists: • Search permission is denied on a component of the pathname prefix.
System Functions (n - p) [EIO] open(2) • The O_CREAT flag is set and bits other than the file permission and appropriate file type flags are set in the mode parameter. • Both the O_TRUNC flag and O_RDONLY flag are set. • None of the access flags O_RDONLY, O_WRONLY, or O_RDWR are set. • The function call attempted to create a Guardian file (that is, a file in the /G file system), but the pathname cannot be mapped to a valid Guardian filename.
open(2) OSS System Calls Reference Manual • O_CREAT is set, and the pathname prefix does not exist. • The path parameter points to an empty string. • The function call attempted to open a file in the Guardian file system, but the specified pathname cannot be mapped to a valid Guardian filename. • The path parameter points to a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOMEM] The system has insufficient resources to allow another open file.
System Functions (n - p) open(2) RELATED INFORMATION Functions: chmod(2), close(2), creat(2), fcntl(2), lseek(2), mknod(2), read(2), stat(2), umask(2), write(2). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • The O_RDWR flag is supported for FIFO files. • The group ID of the new file is determined by the value of the O_ISGID flag in the parent directory.
pipe(2) OSS System Calls Reference Manual NAME pipe - Creates an interprocess communication channel LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int pipe( int filedes [2]); PARAMETERS filedes Specifies the address of an array of two integers into which new file descriptors are placed.
System Functions (n - p) pipe(2) [EMFILE] No more file descriptors are available for this process. [ENOMEM] The system has insufficient resources. [ENOROOT] The function was called while the root fileset (fileset 0) was not available. [EOSSNOTRUNNING] The function was called while a required system process was not running. For all other error conditions, errno is set to the appropriate Guardian file-system error number.
pthread_atfork(2) OSS System Calls Reference Manual NAME pthread_atfork - Declares fork-handler routines to be called when the calling thread’s process forks a child process LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (n - p) pthread_atfork(2) EXAMPLES If your library uses a mutex my_mutex, you might provide pthread_atfork( ) handler routines coded as follows: void my_prepare(void) { pthread_mutex_lock(&my_mutex); } void my_parent(void) { pthread_mutex_unlock(&my_mutex); } void my_child(void) { pthread_mutex_unlock(&my_mutex); /* Reinitialize state that doesn’t apply...like heap owned */ /* by other threads */ } { . . . pthread_atfork(my_prepare, my_parent, my_child); . .
pthread_attr_destroy(2) OSS System Calls Reference Manual NAME pthread_attr_destroy - Destroys a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/ZDLLnnn/zsptdll SYNOPSIS #include int pthread_attr_destroy( pthread_attr_t *attr ); PARAMETERS attr specifies the thread attributes object to be destroyed. DESCRIPTION This function destroys a thread attributes object.
System Functions (n - p) pthread_attr_getdetachstate(2) NAME pthread_attr_getdetachstate - Obtains the detachstate attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_getdetachstate( const pthread_attr_t *attr, int *detachstate ); PARAMETERS attr specifies the address of the thread attributes object whose detachstate attribute is obtained.
pthread_attr_getguardsize_np(2) OSS System Calls Reference Manual NAME pthread_attr_getguardsize_np - Obtains the guardsize attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_getguardsize_np( const pthread_attr_t *attr, size_t *guardsize ); PARAMETERS attr specifies the address of the thread attributes object whose guardsize attribute is obtained.
System Functions (n - p) pthread_attr_getinheritsched(2) NAME pthread_attr_getinheritsched - Obtains the inherit scheduling attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
pthread_attr_getschedparam(2) OSS System Calls Reference Manual NAME pthread_attr_getschedparam - Obtains the scheduling parameters of the scheduling policy attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (n - p) pthread_attr_getschedpolicy(2) NAME pthread_attr_getschedpolicy - Obtains the scheduling policy attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_getschedpolicy( const pthread_attr_t *attr, int *policy ); PARAMETERS attr specifies the address of the thread attributes object whose scheduling policy attribute is obtained.
pthread_attr_getstackaddr(2) OSS System Calls Reference Manual NAME pthread_attr_getstackaddr - Obtains the stackbase address attribute of the specified thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (n - p) pthread_attr_getstacksize(2) NAME pthread_attr_getstacksize - Obtains the stacksize attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_getstacksize( const pthread_attr_t *attr, size_t *stacksize ); PARAMETERS attr specifies the address of the thread attributes object whose stacksize attribute is obtained.
pthread_attr_init(2) OSS System Calls Reference Manual NAME pthread_attr_init - Initializes a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_init( pthread_attr_t *attr ); PARAMETERS attr specifies the address of the thread attributes object to be initialized.
System Functions (n - p) pthread_attr_init(2) RETURN VALUES If an error condition occurs, the thread attributes object cannot be used and this function returns an integer value indicating the type of error. Possible return values are: 0 Successful completion. [EINVAL] The value specified by the attr parameter is not a valid thread attributes object. [ENOMEM] Insufficient memory exists to initialize the thread attributes object.
pthread_attr_setdetachstate(2) OSS System Calls Reference Manual NAME pthread_attr_setdetachstate - Sets the detachstate attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ); PARAMETERS attr specifies the thread attributes object whose detachstate attribute is to be set.
System Functions (n - p) pthread_attr_setdetachstate(2) RELATED INFORMATION Functions: pthread_attr_init(2), pthread_attr_getdetachstate(2), pthread_create(2), pthread_join(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
pthread_attr_setguardsize_np(2) OSS System Calls Reference Manual NAME pthread_attr_setguardsize_np - Sets the guardsize attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_setguardsize_np( pthread_attr_t *attr, size_t guardsize ); PARAMETERS attr specifies the address of the thread attributes object whose guardsize attribute is to be set.
System Functions (n - p) [EINVAL] pthread_attr_setguardsize_np(2) The value specified for the attr parameter or the guardsize parameter is invalid. RELATED INFORMATION Functions: pthread_attr_init(2), pthread_attr_getguardsize_np(2), pthread_attr_setstacksize(2), pthread_create(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification and to the following industry standards: • 527186-005 IEEE Std 1003.
pthread_attr_setinheritsched(2) OSS System Calls Reference Manual NAME pthread_attr_setinheritsched - Sets the inherit scheduling attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (n - p) [ENOTSUP] pthread_attr_setinheritsched(2) An attempt was made to set the attribute to an unsupported value. RELATED INFORMATION Functions: pthread_attr_init(2), *Lpthread_attr_getinheritsched(2), pthread_attr_setschedpolicy(2), pthread_attr_setschedparam(2), pthread_create(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
pthread_attr_setschedparam(2) OSS System Calls Reference Manual NAME pthread_attr_setschedparam - Sets the scheduling parameters of the scheduling policy attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (n - p) pthread_attr_setschedparam(2) SCHED_FG_NP PRI_FG_MIN_NP to PRI_FG_MAX_NP SCHED_BG_NP PRI_BG_MIN_NP to PRI_BG_MAX_NP The default priority is 24. RETURN VALUES If an error condition occurs, this function returns an integer value indicating the type of error. Possible return values ares: 0 Successful completion. [EINVAL] The value specified by the attr parameter is not a valid thread attributes object or the value specified by param is invalid.
pthread_attr_setschedpolicy(2) OSS System Calls Reference Manual NAME pthread_attr_setschedpolicy - Sets the scheduling policy attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ); PARAMETERS attr specifies the address of the thread attributes object whose scheduling policy attribute is to be set.
System Functions (n - p) pthread_attr_setstacksize(2) NAME pthread_attr_setstacksize - Sets the stacksize attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ); PARAMETERS attr specifies the address of the thread attributes object whose stacksize attribute is to be set.
pthread_cancel(2) OSS System Calls Reference Manual NAME pthread_cancel - Requests that a thread terminate execution LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_cancel( pthread_t thread ); PARAMETERS thread specifies the thread that receives the cancelation request. DESCRIPTION This function sends a cancelation request to the specified target thread.
System Functions (n - p) pthread_cancel(2) RELATED INFORMATION Functions: pthread_cleanup_pop(2), pthread_cleanup_push(2), pthread_create(2), pthread_exit(2), pthread_join(2), pthread_setcancelstate(2), pthread_setcanceltype(2), pthread_testcancel(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
pthread_cleanup_pop(2) OSS System Calls Reference Manual NAME pthread_cleanup_pop - (Macro) Removes the cleanup-handler routine from the calling thread’s cleanup-handler stack and optionally executes it LIBRARY None. This application program interface is implemented as a macro. SYNOPSIS #include void pthread_cleanup_pop( int execute ); PARAMETERS execute controls whether the cleanup-handler routine specified in the matching call to pthread_cleanup_push( ) is executed.
System Functions (n - p) pthread_cleanup_push(2) NAME pthread_cleanup_push - (Macro) Establishes a cleanup-handler routine to be executed when the thread terminates LIBRARY None. This application program interface is implemented as a macro. SYNOPSIS #include void pthread_cleanup_push( void ( *routine ) ( void * ), void *arg ); PARAMETERS routine specifies the routine to be executed as the cleanup handler. arg specifies an argument to be passed to the cleanup routine.
pthread_cond_broadcast(2) OSS System Calls Reference Manual NAME pthread_cond_broadcast - Unblocks all threads that are waiting on the specified condition variable LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_cond_broadcast( pthread_cond_t *cond ); PARAMETERS cond specifies a condition variable upon which the threads (to be awakened) are waiting.
System Functions (n - p) pthread_cond_destroy(2) NAME pthread_cond_destroy - Destroys a condition variable LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_cond_destroy( pthread_cond_t *cond ); PARAMETERS cond specifies the condition variable to be destroyed. DESCRIPTION This function destroys the condition variable specified by the cond parameter.
pthread_cond_init(2) OSS System Calls Reference Manual NAME pthread_cond_init - Initializes a condition variable LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ); PARAMETERS cond specifies the condition variable to be initialized.
System Functions (n - p) pthread_cond_init(2) [EBUSY] The implementation has detected an attempt to reinitialize the object indicated by cond, a previously initialized, but not yet destroyed, condition variable. [EINVAL] The value specified by the attr parameter is invalid. [ENOMEM] Insufficient memory exists to initialize the condition variable.
pthread_cond_signal(2) OSS System Calls Reference Manual NAME pthread_cond_signal - Unblocks at least one thread that is waiting on the specified condition variable LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/systemzdllsnnn/zsptdll SYNOPSIS #include int pthread_cond_signal( pthread_cond_t *cond ); PARAMETERS cond specifies the condition variable to be signaled.
System Functions (n - p) pthread_cond_signal_int_np(2) NAME pthread_cond_signal_int_np - Unblocks one thread that is waiting on the specified condition variable; callable only from an interrupt-handler routine LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_cond_signal_int_np( pthread_cond_t *cond ); PARAMETERS cond specifies the condition variable to be signaled.
pthread_cond_timedwait(2) OSS System Calls Reference Manual NAME pthread_cond_timedwait - Causes a thread to wait either for a condition variable to be signaled or broadcast, or for a specific expiration time LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (n - p) pthread_cond_timedwait(2) RETURN VALUES If an error condition occurs, this function returns an integer value indicating the type of error. Possible return values are: 0 Successful completion. [EINVAL] One of the following conditions exists: [ENOMEM] • The value specified by cond, mutex, or abstime is invalid. • Different mutexes are supplied for concurrent pthread_cond_timedwait( ) operations or pthread_cond_wait( ) operations on the same condition variable.
pthread_cond_wait(2) OSS System Calls Reference Manual NAME pthread_cond_wait - Causes a thread to wait for the specified condition variable to be signaled or broadcast LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ); PARAMETERS cond specifies the condition variable that the calling thread waits on.
System Functions (n - p) [EINVAL] [ENOMEM] pthread_cond_wait(2) One of the following conditions exists: • The value specified by the cond or mutex parameter is invalid. • Different mutexes are supplied for concurrent pthread_cond_wait( ) operations or pthread_cond_timedwait( ) operations on the same condition variable. • The mutex was not owned by the calling thread at the time of the call. The system cannot acquire the memory needed to block using a statically initialized condition variable.
pthread_condattr_destroy(2) OSS System Calls Reference Manual NAME pthread_condattr_destroy - Destroys a condition variable attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_condattr_destroy( pthread_condattr_t *attr ); PARAMETERS attr specifies the condition variable attributes object to be destroyed.
System Functions (n - p) pthread_condattr_init(2) NAME pthread_condattr_init - Initializes a condition variable attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_condattr_init( pthread_condattr_t *attr ); PARAMETERS attr specifies the condition variable attributes object to be initialized.
pthread_condattr_init(2) OSS System Calls Reference Manual The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (n - p) pthread_create(2) NAME pthread_create - Creates a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_create( pthread_t *thread, const pthread_attr_t *attr, void * ( *start_routine ) ( void * ), void *arg ); PARAMETERS thread specifies the location to receive the identifier for the thread being created.
pthread_create(2) OSS System Calls Reference Manual For the duration of the new thread’s existence, the system maintains and manages the thread object and other thread state overhead. The system assigns each new thread a thread identifier, which the system writes into the address specified by the thread parameter before the new thread executes. At thread creation, the scheduling policy and scheduling parameters stored in the thread attributes object passed to pthread_create( ) is used by default.
System Functions (n - p) pthread_create(2) • To exit a thread terminated by a call to pthread_exit( ), the system raises the pthread_exit_e exception. To exit a thread terminated by cancelation, the system raises the pthread_cancel_e exception. Your program can use the exception package to operate on the generated exception.
pthread_delay_np(2) OSS System Calls Reference Manual NAME pthread_delay_np - Delays execution of a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_delay_np( const struct timespec *interval ); PARAMETERS interval specifies the number of seconds and nanoseconds to delay execution. The value specified for each must be greater than or equal to 0 (zero).
System Functions (n - p) pthread_detach(2) NAME pthread_detach - Marks a thread object for deletion LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/ZDLLnnn/zsptdll SYNOPSIS #include int pthread_detach( pthread_t thread ); PARAMETERS thread specifies the thread object being marked for deletion.
pthread_equal(2) OSS System Calls Reference Manual NAME pthread_equal - Compares two thread identifiers LIBRARY None. This routine has been implemented as a macro. SYNOPSIS #include int pthread_equal( pthread_t t1, pthread_t t2 ); PARAMETERS t1 specifies the first thread identifier to be compared. t2 specifies the second thread identifier to be compared. DESCRIPTION This function compares two thread identifiers.
System Functions (n - p) pthread_exit(2) NAME pthread_exit - Terminates the calling thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include void pthread_exit( void *value_ptr ); PARAMETERS value_ptr specifies the value to be copied and returned to the caller of the pthread_join( ) function. Note that void * is used as a universal datatype, not as a pointer.
pthread_get_expiration_np(2) OSS System Calls Reference Manual NAME pthread_get_expiration_np - Calculates an absolute expiration time LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/ZDLLnnn/zsptdll SYNOPSIS #include int pthread_get_expiration_np( const struct timespec *delta, struct timespec *abstime ); PARAMETERS delta specifies the number of seconds and nanoseconds to add to the current system time to determine an expiration time.
System Functions (n - p) pthread_getattr_np(2) NAME pthread_getattr_np - Gets the attribute object for a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_getattr_np ( const pthread_t thread, pthread_attr_t **attr_p ); PARAMETERS thread Specifies the thread for which you want the attribute object. attr_p Receives the attribute object pointer returned by the call.
pthread_getconcurrency(2) OSS System Calls Reference Manual NAME pthread_getconcurrency - Gets level of concurrency LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_getconcurrency(void); DESCRIPTION Concurrency values range from 0 to MAXINT inclusive. A concurrency level of 0 suggests to the scheduler that the minimum possible amount of concurrency is required.
System Functions (n - p) pthread_getschedparam(2) NAME pthread_getschedparam - Obtains the current scheduling policy and scheduling parameters of a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ); PARAMETERS thread specifies the thread whose scheduling policy and parameters are obtained.
pthread_getschedparam(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
System Functions (n - p) pthread_getspecific(2) NAME pthread_getspecific - Obtains the thread-specific data associated with a key LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include void *pthread_getspecific( pthread_key_t key ); PARAMETERS key specifies the context key that identifies the thread-specific data to be obtained.
pthread_join(2) OSS System Calls Reference Manual NAME pthread_join - Causes the calling thread to wait for the termination of a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_join( pthread_t thread, void **value_ptr); PARAMETERS thread specifies the thread whose termination is awaited by the calling thread. value_ptr receives the return value of the terminating thread.
System Functions (n - p) pthread_join(2) STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
pthread_key_create(2) OSS System Calls Reference Manual NAME pthread_key_create - Generates a unique thread-specific data key LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_key_create( pthread_key_t *key, void (*destructor)(void *)); PARAMETERS key specifies the location where the new thread-specific data key is to be stored.
System Functions (n - p) pthread_key_create(2) RETURN VALUES If an error condition occurs, this function returns an integer value indicating the type of error. Possible return values are: 0 Successful completion. [EAGAIN] The system lacked the necessary resources to create another thread-specific data key, or the limit on the total number of keys for a process (PTHREAD_KEYS_MAX) has been exceeded. [ENOMEM] Insufficient memory exists to create the key.
pthread_key_delete(2) OSS System Calls Reference Manual NAME pthread_key_delete - Deletes a thread-specific data key LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_key_delete( pthread_key_t key); PARAMETERS key specifies the thread-specific data key to be deleted.
System Functions (n - p) pthread_kill(2) NAME pthread_kill - Sends a signal to a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include int pthread_kill( pthread_t thread, int sig); PARAMETERS thread specifies the thread to receive the signal. sig specifies the signal to send.
pthread_kill(2) OSS System Calls Reference Manual RETURN VALUES If an error condition occurs, this function returns an integer value indicating the type of error. Possible return values are: 0 Successful completion. [EINVAL] The value of the sig parameter is invalid or specifies an unsupported signal. [ESRCH] The thread parameter does not specify an existing thread. RELATED INFORMATION Functions: sigaction(2), sigwait(2). Files: signal(4).
System Functions (n - p) pthread_lock_global_np(2) NAME pthread_lock_global_np - Locks the global mutex for threads LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_lock_global_np( void); DESCRIPTION This function locks the threads global mutex.
pthread_mutex_destroy(2) OSS System Calls Reference Manual NAME pthread_mutex_destroy - Destroys a mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutex_destroy( pthread_mutex_t *mutex); PARAMETERS mutex specifies the mutex to be destroyed. DESCRIPTION This function destroys the specified mutex by uninitializing it.
System Functions (n - p) pthread_mutex_init(2) NAME pthread_mutex_init - Initializes a mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); PARAMETERS mutex specifies the mutex to be initialized. attr specifies the mutex attributes object that defines the characteristics of the mutex to be initialized.
pthread_mutex_init(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: pthread_mutex_destroy(2), pthread_mutex_lock(2), pthread_mutex_trylock(2), pthread_mutex_unlock(2), pthread_mutexattr_destroy(2), pthread_mutexattr_init(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (n - p) pthread_mutex_lock(2) NAME pthread_mutex_lock - Locks an unlocked mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutex_lock( pthread_mutex_t *mutex); PARAMETERS mutex specifies the mutex to be locked. DESCRIPTION This function locks a mutex.
pthread_mutex_trylock(2) OSS System Calls Reference Manual NAME pthread_mutex_trylock - Attempts to lock a specified mutex but does not wait if the mutex is already locked LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutex_trylock( pthread_mutex_t *mutex); PARAMETERS mutex specifies the mutex to be locked.
System Functions (n - p) pthread_mutex_unlock(2) NAME pthread_mutex_unlock - Unlocks a mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutex_unlock( pthread_mutex_t *mutex); PARAMETERS mutex specifies the mutex to be unlocked. DESCRIPTION This function unlocks the mutex specified by the mutex parameter.
pthread_mutexattr_destroy(2) OSS System Calls Reference Manual NAME pthread_mutexattr_destroy - Destroys a mutex attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutexattr_destroy( pthread_mutexattr_t *attr); PARAMETERS attr specifies the mutex attributes object to be destroyed. DESCRIPTION This function destroys a mutex attributes object by unintializing it.
System Functions (n - p) pthread_mutexattr_getkind_np(2) NAME pthread_mutexattr_getkind_np - Obtains the mutex type attribute of a mutex attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern int pthread_mutexattr_getkind_np( pthread_mutexattr_t attr ); PARAMETERS attr specifies the mutex attributes object whose mutex type is to be obtained.
pthread_mutexattr_init(2) OSS System Calls Reference Manual NAME pthread_mutexattr_init - Initializes a mutex attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_mutexattr_init( pthread_mutexattr_t *attr); PARAMETERS attr specifies the mutex attributes object to be initialized.
System Functions (n - p) pthread_mutexattr_init(2) STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
pthread_mutexattr_setkind_np(2) OSS System Calls Reference Manual NAME pthread_mutexattr_setkind_np - Sets the mutex type attribute of a mutex attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind ); PARAMETERS attr specifies the mutex attributes object whose mutex type attribute is to be modified.
System Functions (n - p) pthread_mutexattr_setkind_np(2) [EPERM] The caller does not have the appropriate privileges to perform this operation. [ERANGE] One or more of the parameters have an invalid value. RELATED INFORMATION Functions: pthread_mutex_init(2), pthread_mutexattr_getkind_np(2), pthread_mutexattr_init(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification and to the following industry standards: • 527186-005 IEEE Std 1003.
pthread_once(2) OSS System Calls Reference Manual NAME pthread_once - Calls a routine to be executed once by a single thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include pthread_once_t once_control = PTHREAD_ONCE_INIT; int pthread_once( pthread_once_t *once_control, void ( *routine)(void) ); PARAMETERS once_control specifies a block that controls the one-time execution code.
System Functions (n - p) pthread_self(2) NAME pthread_self - Obtains the thread identifier of the calling thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include pthread_t pthread_self( void ); DESCRIPTION This function returns the thread identifier of the calling thread. RETURN VALUES This function returns the thread identifier of the calling thread.
pthread_setcancelstate(2) OSS System Calls Reference Manual NAME pthread_setcancelstate - Sets the calling thread’s cancelability state LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_setcancelstate( int state, int *oldstate ); PARAMETERS state specifies the new cancelability state for the calling thread.
System Functions (n - p) pthread_setcancelstate(2) STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
pthread_setcanceltype(2) OSS System Calls Reference Manual NAME pthread_setcanceltype - Sets the calling thread’s cancelability type LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_setcanceltype( int type, int *oldtype ); PARAMETERS type specifies the cancelability type to set for the calling thread.
System Functions (n - p) pthread_setcanceltype(2) STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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. The use of [ENOTSUP] is an HP extension to the POSIX standard.
pthread_setconcurrency(2) OSS System Calls Reference Manual NAME pthread_setconcurrency - Sets level of concurrency LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_setconcurrency(int new_level); DESCRIPTION Concurrency values range from 0 to MAXINT inclusive. A concurrency level of 0 suggests to the scheduler that the minimum possible amount of concurrency is required.
System Functions (n - p) pthread_setschedparam(2) NAME pthread_setschedparam - Sets the scheduling policy and scheduling parameters of a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_setschedparam( pthread_t thread, int policy, const struct sched_param *param ); PARAMETERS thread specifies the thread whose scheduling policy and parameters are to be set.
pthread_setschedparam(2) OSS System Calls Reference Manual [EINVAL] The value specified by the policy or param parameter is invalid. [ENOTSUP] An attempt was made to set the scheduling policy or a scheduling parameter to an unsupported value. [ESRCH] The thread parameter does not refer to an existing thread. RELATED INFORMATION Functions: pthread_attr_setschedparam(2), pthread_attr_setschedpolicy(2), pthread_create(2), pthread_self(2), sched_yield(2).
System Functions (n - p) pthread_setspecific(2) NAME pthread_setspecific - Sets the thread-specific data associated with a key LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_setspecific( pthread_key_t key, const void *value ); PARAMETERS key specifies the thread-specific key that identifies the thread-specific data to be set to the new value.
pthread_sigmask(2) OSS System Calls Reference Manual NAME pthread_sigmask - Examines or changes the calling thread’s signal mask LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include [#include ] int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ); PARAMETERS how indicates how the set of masked signals is to be changed.
System Functions (n - p) pthread_sigmask(2) STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
pthread_testcancel(2) OSS System Calls Reference Manual NAME pthread_testcancel - Requests delivery of a pending cancelation request to the calling thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include void pthread_testcancel(void); DESCRIPTION This function requests delivery of a pending cancelation request to the calling thread.
System Functions (n - p) pthread_unlock_global_np(2) NAME pthread_unlock_global_np - Unlocks the threads global mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int pthread_unlock_global_np(void); DESCRIPTION This function unlocks the threads global mutex.
Section 6. System Functions (r) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with r. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
rand_r(2) OSS System Calls Reference Manual NAME rand_r - Returns pseudorandom numbers (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int rand_r ( unsigned int *seed ); PARAMETERS seed Specifies the initial value upon which random numbers should be based. DESCRIPTION The rand_r( ) function is the reentrant version of the rand( ) function.
System Functions (r) read(2) NAME read - Reads from a file LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ ssize_t read( int filedes, void *buffer, size_t nbytes); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the accept( ), creat( ), dup( ), dup2( ), fcntl( ), open( ), pipe( ), socket( ), or socketpair( ) function.
read(2) OSS System Calls Reference Manual • If no process has the pipe open for writing, the read( ) function returns the value 0 (zero) to indicate EOF. • If some process has the pipe open for writing: — If the O_NONBLOCK flag is not set, the read( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing. — If the O_NONBLOCK flag is set, the read( ) function returns the value -1 and sets errno to [EAGAIN].
System Functions (r) [EAGAIN] read(2) The O_NONBLOCK flag is set for the file descriptor, and the process would be delayed in the read operation. The O_NONBLOCK flag is set, and no data was available. [EBADF] The filedes parameter is not a valid file descriptor open for reading. [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available.
read(2) OSS System Calls Reference Manual • The processor for the disk process of the specified file failed during an input or output operation, and takeover by the backup process occurred. • The open file descriptor has migrated to a new processor, but the new processor lacks a resource or system process needed for using the file descriptor. The file descriptor specified by the filedes parameter can only be closed.
System Functions (r) readdir_r(2) NAME readdir_r - Reads a directory stream (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include int readdir_r ( DIR *dirp, struct dirent *ret, struct dirent **result ); PARAMETERS dirp Points to the dirent structure of an open directory. ret Points to the directory entry at the current position in the directory stream.
readdir_r(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the readdir_r( ) function returns the value 0 (zero). Otherwise, a nonzero error number is returned, and errno is set to indicate the error. See the ERRORS subsection of this reference page for the possible values that can be returned.
System Functions (r) readlink(2) NAME readlink - Reads the value of a symbolic link LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int readlink( const char *path, char *buffer, size_t buf_size); PARAMETERS path Specifies the pathname of the destination file or directory. buffer Points to the user’s buffer.
readlink(2) OSS System Calls Reference Manual • The current working directory is assigned from the VOLUME attribute of the Guardian environment =_DEFAULTS DEFINE. • The use of static memory by the process increases slightly. These effects occur only when the first of the set of functions is called. The effects are not cumulative. RETURN VALUES Upon successful completion, the readlink( ) function returns the number of characters placed in the buffer (not including any terminating null).
System Functions (r) readlink(2) • The fileset containing the requestor’s current working directory or root directory is not mounted. This error can occur after failure and restart of an OSS name server process until the fileset has been repaired and remounted. [EOSSNOTRUNNING] The program attempted an operation on an object in the OSS environment while a required system process is not running. RELATED INFORMATION Functions: link(2), lstat(2), stat(2), symlink(2), unlink(2).
readv(2) OSS System Calls Reference Manual NAME readv - Reads from a file into scattered buffers LIBRARY G-series native OSS processes: /G/system/sysnn/zossesrl H-series OSS processes: /G/system/zdllnnn/zossedll SYNOPSIS #include #include
System Functions (r) readv(2) — If the O_NONBLOCK flag is not set, the readv( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing. — If the O_NONBLOCK flag is set, the readv( ) function returns the value -1 and sets errno to [EAGAIN]. When attempting to read from a socket and no data is currently available: • If the O_NONBLOCK flag is not set, the readv( ) function blocks until data becomes available or an error occurs.
readv(2) OSS System Calls Reference Manual ERRORS If any of these conditions occurs, the readv( ) function sets errno to the corresponding value: [EAGAIN] [EBADF] One of these conditions occurred: • The O_NONBLOCK flag is set for the file descriptor, and the process would be delayed in the read operation. • The O_NONBLOCK flag is set for the file descriptor, and no data was available. The filedes parameter is not a valid file descriptor open for reading.
System Functions (r) readv(2) [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOTCONN] The socket is no longer connected to a peer socket. [ETIMEDOUT] Data transmission on the socket timed out. [EWOULDBLOCK] The process attempted an operation on a socket for which O_NONBLOCK is set, there is no data, and no error has occurred.
recv(2) OSS System Calls Reference Manual NAME recv - Receives a message from a connected socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include ssize_t recv( int socket, void *buffer, size_t length, int flags ); PARAMETERS socket Specifies the file descriptor of the socket. buffer Points to the buffer where the message should be written.
System Functions (r) recv(2) If the recv( ) function call fails, the value -1 is returned and errno is set to indicate the error. ERRORS If any of the following conditions occurs, the recv( ) function sets errno to the corresponding value: [EBADF] The socket parameter is not a valid file descriptor. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available.
recv(2) 6−18 OSS System Calls Reference Manual Hewlett-Packard Company 527186-005
System Functions (r) recvfrom(2) NAME recvfrom - Receives a message from a socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include ssize_t recvfrom( int socket, void *buffer, size_t length, int flags, struct sockaddr *address, size_t *address_len ); PARAMETERS socket Specifies the file descriptor of the socket. buffer Points to the buffer where the message should be written.
recvfrom(2) OSS System Calls Reference Manual If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the recvfrom( ) function blocks until a message arrives. If no messages are available at the socket and the socket’s file descriptor is marked nonblocking (O_NONBLOCK is set), the recvfrom( ) function fails and sets errno to [EWOULDBLOCK].
System Functions (r) recvfrom(2) [ENOTSOCK] The socket parameter does not refer to a socket. [EOPNOTSUPP] The specified value for the flags parameter is not supported for this socket type or protocol. [ETIMEDOUT] A transmission timed out on an active connection. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set) and the operation would block.
recvmsg(2) OSS System Calls Reference Manual NAME recvmsg - Receives a message from a socket using a message structure LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include ssize_t recvmsg( int socket, struct msghdr *message, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
System Functions (r) recvmsg(2) If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the recvmsg( ) function blocks until a message arrives. If no messages are available at the socket and the socket’s file descriptor is marked nonblocking (O_NONBLOCK is set), the recvmsg( ) function fails and sets errno to [EWOULDBLOCK]. In the msghdr structure, the msg_name and msg_namelen members specify the source address if the socket is unconnected.
recvmsg(2) OSS System Calls Reference Manual [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The socket can only be closed. [EFAULT] A user-supplied memory buffer cannot be accessed or written. [EINTR] A signal interrupted the function before any data was available.
System Functions (r) recvmsg(2) RELATED INFORMATION Functions: recv(2), recvfrom(2), select(2), send(2), sendmsg(2), sendto(2), shutdown(2), socket(2), socketpair(2). STANDARDS CONFORMANCE The HP implementation does not return the errno value [ENOSR]. HP extensions to the XPG4 specification are: 527186-005 • The errno value [ECONNRESET] can be returned when the transport-provider process is not available. • The errno value [EMFILE] can be returned.
rename(2) OSS System Calls Reference Manual NAME rename - Renames a file or directory LIBRARY G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL G-series native OSS processes: system library H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL H-series OSS processes: implicit libraries DESCRIPTION The C run-time library supports two variants of the rename( ) function: rename_oss( ) and rename_guardian( ).
System Functions (r) rename_guardian(2) NAME rename_guardian - Renames a file (Guardian rename( ) function) LIBRARY G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL G-series native OSS processes: /G/system/sysnn/zcrtlsrl H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL H-series OSS processes: /G/system/zdllnnn/zcrtldll SYNOPSIS #include
rename_guardian(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the rename( ) function returns a 0 (zero). Otherwise, a nonzero value is returned and the name of the file is not changed. RELATED INFORMATION Functions: rename(2), rename_oss(2). STANDARDS CONFORMANCE The rename_guardian( ) function is a HP extension to the XPG4 Version 2 specification.
System Functions (r) rename_oss(2) NAME rename_oss - Renames a file or directory (OSS rename( ) function) LIBRARY G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL G-series native OSS processes: system library H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL H-series OSS processes: implicit libraries SYNOPSIS #include
rename_oss(2) OSS System Calls Reference Manual If the from and to parameters specify directories, the following requirements exist: • The directory specified by the from parameter must not be an ancestor of the directory specified by the to parameter. For example, the to pathname must not contain a pathname prefix that specifies from. • The directory specified by the to parameter must be empty, except for the . (dot) and . . (dot-dot) entries.
System Functions (r) rename_oss(2) To use the rename_oss( ) and rename_guardian( ) functions, specify the _TANDEM_SOURCE feature-test macro. RETURN VALUES Upon successful completion, the rename( ) function returns the value 0 (zero). Otherwise, the value -1 is returned and errno is set to indicate the error. ERRORS If any of the following conditions occurs, the rename( ) function sets errno to the corresponding value. The file or directory name remains unchanged.
rename_oss(2) OSS System Calls Reference Manual — /dev — /dev/tty or /dev/null — lost+found [EEXIST] The to parameter specifies an existing nonempty directory or an existing Guardian file (a file in /G). [EFAULT] Either the to or from parameter is an invalid address. [EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt.
System Functions (r) rename_oss(2) [ENOMEM] The system has insufficient resources to complete the operation. [ENOROOT] One of the following conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state. • The current root fileset for the specified file is unavailable. The OSS name server for the fileset might have failed. • The specified file is on a remote HP NonStop node and communication with the remote name server has been lost.
rename_oss(2) • OSS System Calls Reference Manual The errno value [EMLINK] is not returned, because links to directories are not allowed. The following are HP extensions to the XPG4 Version 2 specification: • The errno values [EFAULT], [EFSBAD], [EGUARDIANOPEN], [ENOMEM], [ENOROOT], [ENXIO], [EOSSNOTRUNNING], [EPERM], and [EXDEV] can be returned. The rename_oss( ) function is a HP extension to the XPG4 Version 2 specification.
System Functions (r) rmdir(2) NAME rmdir - Removes a directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int rmdir( const char *path); PARAMETERS path Specifies the directory pathname. The pathname cannot be specified as . (dot) or . . (dot-dot).
rmdir(2) OSS System Calls Reference Manual Use From the Guardian Environment The rmdir( ) function is one of a set of functions that have the following effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (r) rmdir(2) [EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt. [EINVAL] The specified . (dot) or . . (dot-dot) pathname cannot be removed. [EIO] During a read from or write to a fileset, an I/O error occurred. [ELOOP] Too many symbolic links were encountered in translating the path parameter.
rmdir(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: chmod(2), chroot(2), mkdir(2), mkfifo(3), mknod(2), remove(3), rename(2), umask(2), unlink(2). Commands: rmdir(1). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • The rmdir( ) function can be used to remove the root directory or the current working directory of a process.
Section 7. System Functions (s and S) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with s or S. These reference pages reside in the cat2 or cat3 directory and are sorted alphabetically by U.S. English conventions in this section.
sched_get_priority_max(2) OSS System Calls Reference Manual NAME sched_get_priority_max - Returns the maximum priority for a scheduling policy LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/systemzdllsnnn/zsptdll SYNOPSIS [ #include ] #include int sched_get_priority_max ( int policy ); PARAMETERS policy specifies one of the scheduling policies defined in the sched.h header file.
System Functions (s and S) sched_get_priority_min(2) NAME sched_get_priority_min - Returns the minimum priority for a scheduling policy LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [ #include ] #include int sched_get_priority_min ( int policy ); PARAMETERS policy specifies one of the scheduling policies defined in the sched.h header file.
sched_yield(2) OSS System Calls Reference Manual NAME sched_yield - Signals a willingness to yield the processor to another thread in the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int sched_yield(void); DESCRIPTION This function forces the calling thread to relinquish its processor until it again becomes the head of its thread list.
System Functions (s and S) select(2) NAME select - Selects among file descriptors for synchronous input/output multiplexing LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include
select(2) OSS System Calls Reference Manual timeout Points to a type timeval structure that specifies the time to wait for a response from a call to the select( ) function. When the timeout parameter is not a null pointer, the maximum time interval to wait for the select( ) function to finish is specified by values stored in space reserved by the type timeval structure pointed to by the timeout parameter. A timeout value of 0 (zero) is treated as "do not wait".
System Functions (s and S) select(2) On return, the select( ) function replaces the original file descriptor sets with the corresponding file descriptor sets that have a bit set for each file descriptor representing those objects that are ready for the requested operation. The total number of ready objects represented by set bits in all the file descriptor sets is returned by the select( ) function.
select(2) OSS System Calls Reference Manual • The application can use a variable value for the nfds parameter that is based on the highest numbered file descriptor; for example: fd = open(... .); err = select(fd + 1, ...); • The application can use a fixed value for the nfds parameter that is based on the value of the FD_SETSIZE literal at the time of compilation; for example: err = select(FD_SETSIZE, ...
System Functions (s and S) select(2) ERRORS If any of these conditions occurs, the select( ) function sets errno to the corresponding value: [EBADF] One of the specified file descriptor sets is invalid. One of these conditions occurred: • The invalid file descriptor set contains a file descriptor for a file that is not open.
select(2) OSS System Calls Reference Manual • The errno value [ENETDOWN] can be returned. • The errno value [ETHNOTRUNNING] can be returned. • The time interval specified by the timeout parameter must meet these criteria: — The maximum interval is 2**31 seconds plus 2**31 microseconds. If a value greater than this is specified, the maximum is used instead. — If a specified interval is not a whole multiple of 10 milliseconds, the next highest whole multiple is used instead.
System Functions (s and S) semctl(2) NAME semctl - Performs semaphore control operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int semctl( int semid, int semnum, int cmd [, . . . ]); In this instance, the elipsis ( . . . ) indicates that the function is extensible. An additional, optional parameter can be specified. PARAMETERS semid Specifies the ID of the semaphore set.
semctl(2) OSS System Calls Reference Manual *array Points to an array of semaphore values. These values are returned when the cmd parameter has the value GETALL. These values are used to set semaphore values when the cmd parameter has the value SETALL. arg Specifies the instance of the union used for the fourth parameter. DESCRIPTION An OSS semaphore is identified by a set ID and by a unique semaphore number within that set ID. The semaphore set ID is unique within an HP NonStop server node.
System Functions (s and S) SETALL semctl(2) Sets the respective values of all semaphores in the set to the values specified in the array pointed to in the fourth parameter (arg.array). When this operation successfully executes, the system clears the semaphore’s adjust-on-exit value in all processes that have a semadj value for this semaphore.
semctl(2) OSS System Calls Reference Manual GETPID Returns the value of the sempid field from the semid_ds structure. GETVAL Returns the value of the semval field from the semid_ds structure. GETZCNT Returns the value of the semzcnt field from the semid_ds structure. Upon successful completion, all other values of cmd return the value 0 (zero). If the semctl( ) function fails, the value -1 is returned and errno is set to indicate the error.
System Functions (s and S) semctl(2) RELATED INFORMATION Commands: ipcrm(1), ipcs(1). Functions: ftok(3), semget(2), semop(2). STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: • 527186-005 The errno values [EFAULT] and [ENOTOSS] can be returned.
semget(2) OSS System Calls Reference Manual NAME semget - Creates a new semaphore set ID or returns the ID of an existing semaphore set LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int semget( key_t key, int nsems, int semflg); PARAMETERS key Specifies the key that identifies the semaphore set.
System Functions (s and S) semget(2) • The sem_nsems field is set to the value of the nsems parameter. • The sem_otime field is set to 0 (zero), and the sem_ctime field is set equal to the current time. The semget( ) function does not initialize the sem structure associated with each semaphore in the set. The individual OSS semaphores are initialized by using the semctl( ) function with the SETVAL or SETALL value for the cmd parameter.
semget(2) OSS System Calls Reference Manual [EEXIST] A semaphore set ID already exists for the key parameter, but ((semflg & IPC_CREAT) && (semflg & IPC_EXCL)) is not equal to 0 (zero). [EINVAL] One of the following conditions is true: • A semaphore set ID already exists for the key parameter, but the number of semaphores in the set is less than nsems and nsems is not equal to 0 (zero).
System Functions (s and S) semop(2) NAME semop - Performs semaphore operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int semop( int semid, struct sembuf *sops, size_t nsops); PARAMETERS semid Specifies the ID of the semaphore set. sops Points to the user-defined array of sembuf structures that contain the semaphore operations. nsops Specifies the number of sembuf structures in the array.
semop(2) OSS System Calls Reference Manual sem_flg Specifies various flags for the operations. The possible values are as follows: SEM_UNDO Instructs the system to adjust the process’s adjust-on-exit value (semadj) for a modified semaphore. When the process exits, the system uses this value to restore the semaphore to the value it had before any modifications by the process. This flag is used to prevent locking of resources allocated through a semaphore by a process that no longer exists.
System Functions (s and S) semop(2) If the sem_op field of the sembuf structure contains 0 (zero) and the calling process has read access permission, semop( ) does one of the following: • If the semval field of the sem structure contains 0 (zero), semop( ) returns immediately. • If semval is not zero and (sem_flg & IPC_NOWAIT) is not zero, semop( ) returns immediately.
semop(2) OSS System Calls Reference Manual [EINVAL] [ENOSPC] One of the following conditions is true: • The semid parameter is not a valid semaphore set ID. • The number of semaphores for which the SEM_UNDO flag is specified exceeds the system-defined limit. One of the following conditions is true: • The system-defined limit on the number of undo entries for an undo structure would be exceeded.
System Functions (s and S) send(2) NAME send - Sends a message on a connected socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include ssize_t send( int socket, const void *buffer, size_t length, int flags ); PARAMETERS socket Specifies the file descriptor of the socket. buffer Points to the buffer containing the message to send. length Specifies the length in bytes of the message to send.
send(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the send( ) function returns the number of bytes sent. Otherwise, the value -1 is returned and errno is set to indicate the error. ERRORS If any of the following conditions occurs, the send( ) function sets errno to the corresponding value: [EBADF] The socket parameter is not a valid file descriptor.
System Functions (s and S) send(2) [EWOULDBLOCK] The socket’s file descriptor is marked nonblocking (O_NONBLOCK is set) and the operation would block. RELATED INFORMATION Functions: connect(2), getsockopt(2), recv(2), recvfrom(2), recvmsg(2), select(2), sendmsg(2), sendto(2), setsockopt(2), shutdown(2), socket(2). STANDARDS CONFORMANCE The HP implementation does not return the errno value [ENOSR].
sendmsg(2) OSS System Calls Reference Manual NAME sendmsg - Sends a message on a socket using a message structure LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include ssize_t sendmsg( int socket, const struct msghdr *message, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
System Functions (s and S) sendmsg(2) fails and sets errno to [EWOULDBLOCK]. In the msghdr structure, the msg_control and msg_controllen members specify the ancillary data buffer that can be used only by sockets in the AF_UNIX domain to pass file descriptors to another process on the same node. The msg_control member can be a null pointer if ancillary data is not desired or required.
sendmsg(2) OSS System Calls Reference Manual [EDESTADDRREQ] The socket is not connection-oriented, no peer address is set, and no destination address is specified. [EFAULT] A user-supplied memory buffer cannot be accessed. [EINTR] A signal interrupted the function before any data was transmitted. [EINVAL] One of these conditions occurred: • The socket is in the AF_UNIX domain, and the msg_control member contains either more than 16 file descriptors or fewer than 1 file descriptor.
System Functions (s and S) [ENOMEM] sendmsg(2) Required memory resources were not available. A retry at a later time might succeed. [ENOPROTOOPT] The socket is in the AF_UNIX domain, and the cmsg_level member is not equal to SOL_SOCKET. [ENOTCONN] The socket is connection-oriented but is not connected. [ENOTDIR] The socket is in the AF_UNIX domain, and the pathname specified by the msghdr structure contains a component that is not a directory.
sendto(2) OSS System Calls Reference Manual NAME sendto - Sends a message on a socket LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include ssize_t sendto( int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, size_t dest_len ); PARAMETERS socket Specifies the file descriptor of the socket. message Points to the buffer containing the message to be sent.
System Functions (s and S) sendto(2) DESCRIPTION The sendto( ) function sends a message through a connection-oriented or connectionless socket. If the socket is connectionless, the message is sent to the address specified in the sockaddr structure pointed to by the dest_addr parameter. If the socket is connection-oriented, the dest_addr parameter is ignored. Successful completion of a call to sendto( ) does not imply successful delivery of the message.
sendto(2) OSS System Calls Reference Manual [EINTR] A signal interrupted the function before any data was transmitted. [EIO] The socket is in the AF_UNIX domain and an input or output error occurred. [EINVAL] The dest_len parameter is not a valid length for the address family. [ELOOP] The socket is in the AF_UNIX domain and too many symbolic links were encountered in translating the pathname in the sockaddr structure.
System Functions (s and S) [EPIPE] sendto(2) One of the following conditions occurred: • An attempt was made to send a message on a socket that is shut down for writing. • An attempt was made to send a message on a connection-oriented socket and the peer socket is closed or shut down for reading. The SIGPIPE signal is also sent to the calling process. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set) and the operation would block.
setgid(2) OSS System Calls Reference Manual NAME setgid - Sets the group ID of the calling process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include /* Optional except for POSIX.1 */ int setgid( gid_t gid); PARAMETERS gid Specifies the new group ID.
System Functions (s and S) setpgid(2) NAME setpgid - Sets the process group ID for job control LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int setpgid( pid_t pid, pid_t pgid); PARAMETERS pid Specifies the process whose process group ID is to be changed. pgid Specifies the new process group ID.
setpgid(2) OSS System Calls Reference Manual [EPERM] [ESRCH] One of the following conditions exists: • The process indicated by the pid parameter is a session leader. • The value of the pid parameter matches the OSS process ID of a child process of the calling process, and the child process is not in the same session as the calling process.
System Functions (s and S) setregid(2) NAME setregid - Sets the real and effective group IDs LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include int setregid( gid_t rgid, gid_t egid ); PARAMETERS rgid Specifies the new real group ID. egid Specifies the new effective group ID.
setregid(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: 7−38 • If both the real and effective group IDs are changed so that they differ from each other and from the saved-set group ID, then the saved-set group ID is set to the value of the effective group ID. • A process without appropriate privileges can set the effective group ID if the new effective group ID matches a group ID in the group list of the process.
System Functions (s and S) setreuid(2) NAME setreuid - Sets the real and effective user IDs LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include int setreuid( uid_t ruid, uid_t euid ); PARAMETERS ruid Specifies the new real user ID. euid Specifies the new effective user ID.
setreuid(2) OSS System Calls Reference Manual • 7−40 A process without appropriate privileges cannot set the real user ID.
System Functions (s and S) setsid(2) NAME setsid - Creates a new session and sets the process group ID LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t setsid(void); DESCRIPTION The setsid( ) function creates a new session when the calling process is not a process group leader.
setsockopt(2) OSS System Calls Reference Manual NAME setsockopt - Sets socket options LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include [#include ] [#include ] [#include ] [#include
System Functions (s and S) setsockopt(2) IPV6_LEAVE_GROUP Disables IPv6 multicast UDP datagrams on a specified interface. IPV6_MULTICAST_IF Specifies the interface (subnet) to use for outbound multicast UDP datagrams. option_value is an unsigned int. IPV6_MULTICAST_HOPS Specifies the hop limit for outbound multicast UDP datagrams.
setsockopt(2) OSS System Calls Reference Manual IP_MULTICAST_TTL Specifies the hop limit for outbound multicast UDP datagrams. option_value is an int that is either: • Between 0 and 255 to indicate the maximum number of hops allowed • Between 0 and 255 to indicate the maximum number of hops allowed • -1 to indicate that the default value should be used All other values cause an error and errno is set to [EINVAL].
System Functions (s and S) setsockopt(2) SO_KEEPALIVE Specifies whether to keep connections active by enabling the periodic transmission of messages on a connected socket. The default value used when the socket is created is 0 (zero), which indicates that no periodic messages are sent. This option is valid only for AF_INET or AF_INET6 sockets. If this option is specified for sockets of other types, the function call fails and sets errno to [ENOPROTOOPT]. option_value takes an int value.
setsockopt(2) OSS System Calls Reference Manual SO_REUSEPORT Specifies whether the rules used in validating ports supplied by a bind( ) function call should allow reuse of local ports. The default value used for the option when the socket is created is 0 (zero), which indicates that ports should not be reused. This option is valid only for UDP ports. This option takes an int value. Specifying a nonzero value permits ports to be reused. SO_SNDBUF Sets the send buffer size in bytes.
System Functions (s and S) setsockopt(2) TCP_SACKENA Specifies whether TCP selective acknowledgments are enabled. option_value takes an int value. A nonzero value indicates that selective acknowledgments are enabled. A 0 (zero) value indicates that selective acknowledgments should not be used. TCP_TOTRXMTVAL Sets the total maximum retransmission duration in multiples of 500 milliseconds. Once the duration is reached, the TCP cpnnection is dropped. option_value takes an int value.
setsockopt(2) OSS System Calls Reference Manual [EFAULT] A user-supplied memory buffer cannot be accessed. [EINVAL] One of the following conditions exists: • The specified option is not valid at the specified socket level. • The socket has been shut down. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed.
System Functions (s and S) setuid(2) NAME setuid - Sets the user ID of the calling process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl H-series OSS processes: /G/system/zdllnnn/zsecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ int setuid( uid_t uid); PARAMETERS uid Specifies the new user ID.
shmat(2) OSS System Calls Reference Manual NAME shmat - Attaches a shared memory segment to the address space of the calling process LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include void *shmat( int shmid, const void *shmaddr, int shmflag); PARAMETERS shmid Specifies the identifier for the shared memory segment. The identifier is usually returned by a previous call to the shmget( ) function.
System Functions (s and S) shmat(2) Shared Segment Memory Alignment A shared memory segment must be aligned on a region boundary. A region is 32 megabytes (MB) of virtual memory. If the function call requests rounding, the value returned for shmaddr is rounded down to the closest multiple of 32 MB. The SHMLBA constant, which traditionally represents the number of bytes in a page of memory, represents the number of bytes in a region in the OSS implementation.
shmat(2) OSS System Calls Reference Manual [EINVAL] One of the following is true: • The shmid parameter does not specify a valid shared memory identifier. • The shmaddr parameter is not a null pointer and the value of (shmaddr ((ptrdiff_t)shmaddr % SHMLBA)) is an invalid address for attaching shared memory. • The shmaddr parameter is not a null pointer, (shmflag & SHM_RND) is 0 (zero), and the value of shmaddr is an invalid address for attaching shared memory.
System Functions (s and S) shmctl(2) NAME shmctl - Performs shared memory control operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int shmctl( int shmid, int cmd, struct shmid_ds *buf); PARAMETERS shmid Specifies the shared memory identifier for the segment. cmd Specifies the type of operation.
shmctl(2) OSS System Calls Reference Manual DESCRIPTION The shmctl( ) function allows a process to query or set the contents of the shmid_ds structure associated with the specified shared memory identifier. It also allows a process to remove the shared memory identifier and its associated shmid_ds structure. The value of the cmd parameter determines which operation is performed.
System Functions (s and S) shmctl(2) • [EINVAL] The cmd parameter is IPC_SET, and the buf structure is not in the address space of the process. One of the following conditions exists: • The shmid parameter does not specify a valid shared memory identifier. • The cmd parameter is not a valid command. [ENOTOSS] The calling process is not an OSS process. The requested operation is not supported from the Guardian environment.
shmdt(2) OSS System Calls Reference Manual NAME shmdt - Detaches a shared memory segment LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int shmdt( const void *shmaddr); PARAMETERS shmaddr Specifies the starting virtual address for the shared memory segment that is to be detached. This is the address returned by a previous shmat( ) function call.
System Functions (s and S) shmdt(2) RETURN VALUES Upon successful completion, the shmdt( ) function returns the value 0 (zero). The shared memory segment is detached. The value of the shm_nattch field in the structure associated with the shared memory identifier in the shared memory table is decremented. Otherwise, the shmdt( ) function returns the value -1 and sets errno to indicate the error.
shmget(2) OSS System Calls Reference Manual NAME shmget - Creates a new shared memory segment or returns the identifier of an existing shared memory segment LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include int shmget( key_t key, size_t size, int shmflag); PARAMETERS key Specifies the key that identifies the shared memory segment.
System Functions (s and S) shmget(2) DESCRIPTION The shmget( ) function returns the shared memory identifier for the shared memory segment identified by the key parameter. If the key parameter already has a shared memory identifier associated with it and (shmflag & IPC_CREAT) is 0 (zero), that identifier is returned.
shmget(2) OSS System Calls Reference Manual • It allows detection of attempts to reference shared memory segments in other processors. Key Creation The key represents a user-designated name for a given shared memory segment. Keys are usually selected by calling the ftok( ) function before calling the shmget( ) function. The ftok( ) function returns a key based on a path and an interprocess communications identifier.
System Functions (s and S) shmget(2) segment. Use From the Guardian Environment If called from a Guardian process, the function call fails and errno is set to the value of [ENOTOSS]. NOTES The shared memory identifier is not the Guardian environment segid value or segment identifier. Programs should not be written to depend upon the maximum number of attached shared segments. This limit is subject to change.
shmget(2) OSS System Calls Reference Manual RELATED INFORMATION Commands: ipcrm(1), ipcs(1). Functions: ftok(3), shmat(2), shmctl(2), shmdt(2). STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: • 7−62 The errno value [ENOTOSS] can be returned.
System Functions (s and S) shutdown(2) NAME shutdown - Shuts down socket send and receive operations LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int shutdown( int socket, int how ); PARAMETERS socket Specifies the file descriptor of the socket. how Specifies the type of shutdown. The values are as follows: SHUT_RD Disables further receive operations. SHUT_RDWR Disables further send and receive operations.
shutdown(2) OSS System Calls Reference Manual [ENOMEM] Required memory resources were not available. A retry at a later time may succeed. [ENOTCONN] The socket is not connected. [ENOTSOCK] The socket parameter does not specify a socket. RELATED INFORMATION Functions: getsockopt(2), read(2), recv(2), recvfrom(2), recvmsg(2), select(2), send(2), sendmsg(2), sendto(2), setsockopt(2), socket(2), write(2). STANDARDS CONFORMANCE The HP implementation does not return the errno value [ENOSR].
System Functions (s and S) sigaction(2) NAME sigaction - Specifies the action to take upon delivery of a signal LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS [ #include ] #include int sigaction( int signal, const struct sigaction *action, struct sigaction *o_action ); PARAMETERS signal Specifies the signal. The signal names are defined in the signal.h header file.
sigaction(2) OSS System Calls Reference Manual Specifying the Action If the action parameter is not a null pointer, it points to a sigaction structure that describes the action to be taken on receipt of the signal specified in the signal parameter. If the o_action parameter is not a null pointer, it points to a sigaction structure in which the signal action data in effect at the time of the sigaction( ) call is returned.
System Functions (s and S) sigaction(2) The SIGKILL, SIGSTOP, and SIGABEND signals cannot be blocked. If a program attempts to block any of these signals, the system removes them from the signal mask without generating an error.
sigaction(2) OSS System Calls Reference Manual Files: signal(4). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • The ordering of members within the sigaction structure might not match the ordering used in signal.h header files in other environments or on other systems.
System Functions (s and S) sigpending(2) NAME sigpending - Examines pending signals LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int sigpending( sigset_t *set); PARAMETERS set Points to an object of type sigset_t that returns the set of signals that are blocked from delivery and pending to the calling process.
sigprocmask(2) OSS System Calls Reference Manual NAME sigprocmask - Changes or examines the signal mask LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include
System Functions (s and S) sigprocmask(2) Use From the Guardian Environment If called from a TNS or accelerated Guardian process, the actions of this function are undefined and errno is set to [ENOTOSS]. EXAMPLES The following example shows how to use sigprocmask(SIG_BLOCK) to add the signal SIGINT to the signal set named newset and save the old mask. Later, the sigprocmask(SIG_SETMASK) function restores the mask to the previous value returned by the sigprocmask(SIG_BLOCK) function. #include
sigsuspend(2) OSS System Calls Reference Manual NAME sigsuspend - Changes the set of blocked signals and waits for a signal LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int sigsuspend( sigset_t *signal_mask ); PARAMETERS signal_mask Points to a set of signals to be blocked from delivery to the calling process.
System Functions (s and S) sigsuspend(2) RELATED INFORMATION Functions: pause(3), sigaction(2), signal(3), sigprocmask(2). Files: signal(4). STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: 527186-005 • HP has defined several new signals, including SIGABEND. See the signal(4) reference page for a complete list. • The [ENOTOSS] errno value is an HP extension.
sockatmark(2) OSS System Calls Reference Manual NAME sockatmark - Determines whether a socket is at the out-of-band mark LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int sockatmark( int socket); PARAMETERS socket Specifies the file descriptor for the socket. DESCRIPTION The sockatmark( ) function determines whether the specified socket is at an out-of-band mark in its receive queue data.
System Functions (s and S) sockatmark(2) RELATED INFORMATION Functions: recv(2), recvmsg(2), socket(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 specification.
socket(2) OSS System Calls Reference Manual NAME socket - Creates an endpoint for communications LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int socket( int domain, int type, int protocol ); PARAMETERS domain Specifies the address family of the communications domain in which the socket is to be created. type Specifies the type of socket to be created.
System Functions (s and S) socket(2) Socket-level options control socket operations. The getsockopt( ) and setsockopt( ) functions are used to get and set these options, which are defined in the sys/socket.h file.
socket(2) OSS System Calls Reference Manual • If you do assign a base address, do not use any address in the range 0x20000000 through 0x41FFFFFF or any of these flat segment regions: 0x20000000 0x28000000 0x30000000 0x38000000 0x40000000 0x48000000 0x22000000 0x2A000000 0x32000000 0x3A000000 0x42000000 0x4A000000 0x24000000 0x2C000000 0x34000000 0x3C000000 0x44000000 0x4C000000 0x26000000 0x2E000000 0x36000000 0x3E000000 0x46000000 0x4E000000 On some processors, QIO allocates its shared memory region
System Functions (s and S) [ENOMEM] socket(2) Required memory resources were not available. A retry at a later time might succeed. [EPROTONOSUPPORT] The specified address family does not support the specified protocol. [EPROTOTYPE] The specified socket type is not supported by the protocol. [ETANOTRUNNING] The OSS transport agent for this processor is not running. This error also can occur when the calling process has migrated to a new processor that does not have a transport agent to support sockets.
socketpair(2) OSS System Calls Reference Manual NAME socketpair - Creates a pair of connected sockets LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int socketpair( int domain, int type, int protocol, int socket_vector[2] ); PARAMETERS domain Specifies the communications domain in which the sockets are created. This parameter must be set to AF_UNIX. type Specifies the type of sockets to create.
System Functions (s and S) socketpair(2) Use From the Guardian Environment The socketpair( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
socketpair(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the socketpair( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, and errno is set to indicate the error. ERRORS If any of these conditions occurs, the socketpair( ) function sets errno to the corresponding value: [EACCES] The process does not have appropriate privileges to create a socket. [EAFNOSUPPORT] The specified address family is not supported.
System Functions (s and S) socketpair(2) STANDARDS CONFORMANCE The HP implementation does not support the SOCK_SEQPACKET socket type. The HP implementation does not return the errno value [ENOSR]. HP extensions to the XPG4 specification are: • 527186-005 The errno values [ENOENT] and [ETANOTRUNNING] can be returned.
socket_transport_name_get(2) OSS System Calls Reference Manual NAME socket_transport_name_get - Gets the name of the transport-provider process LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int socket_transport_name_get( int domain, char *buffer, int maxlen ); PARAMETERS domain Specifies the domain for which the transport-provider process name should be obtained.
System Functions (s and S) socket_transport_name_get(2) The default AF_INET or AF_INET6 transport-provider name is $ZTC0, unless overridden by an existing Guardian DEFINE =TCPIPˆPROCESSˆNAME. If =TCPIPˆPROCESSˆNAME exists, it must be a MAP DEFINE with a FILE attribute string of the desired AF_INET or AF_INET6 transport-provider name. The default AF_UNIX transport-provider name is $ZPLS. This is the only supported AF_UNIX transport-provider name.
socket_transport_name_set(2) OSS System Calls Reference Manual NAME socket_transport_name_set - Sets the name of the transport-provider process LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int socket_transport_name_set( int domain, char *buffer ); PARAMETERS domain Specifies the domain for which the transport-provider process name is being set.
System Functions (s and S) socket_transport_name_set(2) Each user process has a current transport-provider name for each domain that is used when creating a socket in that domain. The default AF_INET or AF_INET6 transport-provider name is $ZTC0, unless overridden by an existing Guardian DEFINE =TCPIPˆPROCESSˆNAME. If =TCPIPˆPROCESSˆNAME exists, it must be a MAP DEFINE with a FILE attribute string of the desired AF_INET or AF_INET6 transport-provider name.
spt_accept(2) OSS System Calls Reference Manual NAME spt_accept - Initiates thread-aware accept( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_accept( int socket, struct sockaddr *address, size_t *address_len); PARAMETERS See the accept(2) reference page. DESCRIPTION This is a thread-aware version of the accept( ) function.
System Functions (s and S) spt_acceptx(2) NAME spt_acceptx - Accepts a new connection on a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
spt_acceptx(2) OSS System Calls Reference Manual NOTES The macro to map accept( ) to spt_acceptx( ) is available in C applications when SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_NONBLOCK The alias to link accept( ) to spt_acceptx( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.
System Functions (s and S) spt_acceptx(2) [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time may succeed. [ENOTSOCK] The socket parameter does not specify a socket. [EOPNOTSUPP] The socket type of the specified socket does not support accepting connections.
spt_awaitio(2) OSS System Calls Reference Manual NAME spt_awaitio - Awaits a tagged I/O file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) spt_awaitio(2) ERRORS 16 filenum is not registered. 29 filenum < 0 (zero). 40 timelimit has expired. [EINTR] Wait was interrupted via spt_interrupt( ), spt_interruptTag( ), or a signal was received via pthread_kill( ) and is not blocked, ignored, or handled. STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
SPT_CANCEL(2) OSS System Calls Reference Manual NAME SPT_CANCEL - cancels the oldest incomplete operation on a Guardian file opened nowait LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_CANCEL(2) ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: SPT_CONTROL(2), SPT_FILE_CLOSE_(2), SPT_FILE_OPEN_(2), SPT_LOCKFILE(2), SPT_LOCKREC(2), SPT_READLOCKX(2), SPT_READUPDATELOCKX(2), SPT_READUPDATEX(2), SPT_READX(2), SPT_SETMODE(2), SPT_UNLOCKFILE(2), SPT_UNLOCKREC(2), SPT_WRITEREADX(2), SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2).
spt_close(2) OSS System Calls Reference Manual NAME spt_close - Initiates thread-aware close( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_close( int filedes); PARAMETERS See the close(2) reference page. DESCRIPTION This is a thread-aware version of the close( ) function. Use spt_close( ) instead of close( ) to ensure proper operation of the various thread-aware IO functions.
System Functions (s and S) spt_closex(2) NAME spt_closex - Closes a file descriptor (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
spt_closex(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the value 0 (zero) is returned. Otherwise, the value -1 is returned, and errno is set to indicate the error. ERRORS If any of these conditions occur, the spt_closex( ) function sets errno to the corresponding value: [EBADF] The filedes parameter is not a valid open file descriptor. [EIO] An input or output error occurred.
System Functions (s and S) spt_connect(2) NAME spt_connect - Initiates thread-aware connect( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_connect( int socket, const struct sockaddr *address, size_t address_len); PARAMETERS See the connect(2) reference page. DESCRIPTION This is a thread-aware version of the connect( ) function.
spt_connectx(2) OSS System Calls Reference Manual NAME spt_connectx - Connects a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_connectx( int socket, const struct sockaddr *address, size_t address_len ); PARAMETERS socket Specifies the file descriptor for the socket.
System Functions (s and S) • A timeout occurs • A signal is caught spt_connectx(2) If timeout occurs, the spt_connectx( ) call fails and errno is set to [ETIMEDOUT]; the connection is aborted. If an spt_connectx( ) call is interrupted by a signal that is caught while the call is blocked waiting to establish a connection, the spt_connectx( ) call fails and sets errno to [EINTR]; the connection is not aborted and is later established asynchronously.
spt_connectx(2) OSS System Calls Reference Manual [EALREADY] A connection request is already in progress for the specified socket. [EBADF] The socket parameter is not a valid file descriptor. [ECONNREFUSED] The specified address is not listening for connections or rejected the attempt to connect. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available.
System Functions (s and S) spt_connectx(2) The pathconf( ) function can be called to obtain the applicable limits. [ENETDOWN] The local interface used to reach the destination is down. [ENETUNREACH] No route to the network or host is present. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time may succeed.
SPT_CONTROL(2) OSS System Calls Reference Manual NAME SPT_CONTROL - Performs device-dependent input/output operations LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_CONTROL(2) The following considerations apply to use on magnetic tapes: When device is not ready If a magnetic tape rewind is performed concurrently with application program execution (that is, a rewind operation other than 6), any attempt to perform a read, write, or control operation to the rewinding tape unit while rewind is taking place results in an error indication. A subsequent call to the FILE_GETINFO_ or FILEINFO procedure shows that an error 100 occurred.
spt_dup2x(2) OSS System Calls Reference Manual NAME spt_dup2x - Duplicates and controls an open file descriptor (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) spt_dup2x(2) NOTES The macro to map dup2( ) to spt_dup2x( ) is available in C applications when SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_NONBLOCK The alias to link dup2( ) to spt_dup2x( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.
spt_dup2x(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: close(2), dup(2), dup2(2), exec(2), fcntl(2), open(2), read(2), spt_fcntlx(2), spt_readx(2), spt_writex(2), tdm_execve(2), tdm_execvep(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.
System Functions (s and S) spt_fclose(2) NAME spt_fclose - Initiates thread-aware fclose( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fclose(FILE *stream); PARAMETERS See the fclose(3) reference page online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fclose( ) function.
spt_fclosex(2) OSS System Calls Reference Manual NAME spt_fclosex - Closes a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fclosex ( FILE *stream ); PARAMETERS stream Specifies the output or update stream. DESCRIPTION The spt_fclosex( ) function is the thread-aware version of the fclose( ) function.
System Functions (s and S) spt_fclosex(2) ERRORS If any of the following conditions occurs, the spt_fclosex( ) function sets errno to the value that corresponds to the condition: [EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying the stream parameter and the process would be delayed in the write operation. [EBADF] The file descriptor underlying the stream parameter is not valid.
spt_fcntlx(2) OSS System Calls Reference Manual NAME spt_fcntlx - Controls open file descriptors (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] [#include ] #include
System Functions (s and S) F_GETFD spt_fcntlx(2) Gets the value of the file descriptor flags, defined in the fcntl.h header file, that are associated with the value of the filedes parameter. File descriptor flags are associated with a single file descriptor and do not affect other file descriptors that refer to the same file. The argument1 parameter or argument2 parameter is ignored. The value F_GETFD is invalid for an OSSTTY or Telserv terminal device.
spt_fcntlx(2) OSS System Calls Reference Manual The O_ASYNC flag is not supported for sockets. If the O_ASYNC flag is used with F_SETFL, the fcntl( ) call fails, and errno is set to [EINVAL]. The file access mode is not changed when F_SETFL is used. F_GETOWN Gets the process ID or process group ID currently receiving the SIGURG signal for a socket. A process group ID is returned as a negative value. A positive value indicates the process ID.
System Functions (s and S) spt_fcntlx(2) opened with read access. An exclusive lock prevents any other process from setting a shared lock or an exclusive lock on any portion of the protected area. A request for an exclusive lock fails if the file descriptor was not opened with write access. The flock structure describes the type (l_type field), starting offset (l_whence), relative offset (l_start), size (l_len), and process ID (l_pid) of the segment of the file to be affected.
spt_fcntlx(2) F_SETOWN OSS System Calls Reference Manual Returns the value 0 (zero). If the spt_fcntlx( ) function fails, the value -1 is returned, and errno is set to indicate the error. ERRORS If any of these conditions occurs, the spt_fcntlx( ) function sets errno to the corresponding value: [EAGAIN] The request parameter is F_SETLK, the type of lock (l_type) is shared (F_RDLCK) or exclusive (F_WRLCK), and a segment of a file to be locked is already exclusive-locked by another process.
System Functions (s and S) [EIO] spt_fcntlx(2) • The request parameter is F_SETFD, and a flag in addition to FD_CLOEXEC in the argument1 parameter is set. When the request parameter is F_SETFD and FD_CLOEXEC is set, no other flag can be set. • The request parameter is F_SETFL, and any file status flag other than O_NONBLOCK, O_APPEND, O_CREAT, O_EXCL, O_SYNC, or O_TRUNC is set. (Values set in the O_ACCMODE mask are ignored.
spt_fcntlx(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: creat(2), close(2), dup(2), dup2(2), exec(2), fcntl(2), open(2), read(2), socket(2), spt_dup2x(2), spt_readx(2), spt_writex(2), tdm_execve(2), tdm_execvep(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (s and S) spt_fd_read_ready(2) NAME spt_fd_read_ready - Waits on read-ready file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fd_read_ready( const int fd, struct timeval *timeout); PARAMETERS fd Specifies an OSS file descriptor. timeout On input, the maximum interval to wait for fd ready; if NULL, then no timeout will occur. On output, the interval remaining.
spt_fd_write_ready(2) OSS System Calls Reference Manual NAME spt_fd_write_ready - Waits on write-ready file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fd_write_ready( const int fd, struct timeval *timeout); PARAMETERS fd Specifies an OSS file descriptor. timeout On input, specifies the maximum interval to wait for fd ready. If NULL, specifies that no timeout will occur.
System Functions (s and S) spt_fflush(2) NAME spt_fflush - Initiates thread-aware fflush( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fflush( FILE *stream); PARAMETERS See the fflush(3) reference page either online or in the Guardian C Native Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fflush(|) function.
spt_fflushx(2) OSS System Calls Reference Manual NAME spt_fflushx - Flushes a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fflushx( FILE *stream ); PARAMETERS stream Specifies the output or update stream. DESCRIPTION The spt_fflushx( ) function is the thread-aware version of the fflush( ) function.
System Functions (s and S) spt_fflushx(2) [EINTR] The spt_fflushx( ) function was interrupted by a signal that was caught. [EIO] The TOSTOP tty local mode causes a background process to get a SIGTTOU signal if it attempts to write to the controlling terminal. The SIGTTOU signal, if it is not caught or ignored, will cause the process to block in a stopped state. A process in an orphaned process group is not allowed to become stopped, since there is no unprivileged process to unblock it.
spt_fgetc(2) OSS System Calls Reference Manual NAME spt_fgetc - Initiates thread-aware fgetc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fgetc( FILE *stream); PARAMETERS See the fgetc(3) reference page either online or in the Guardian C Native Library Calls Reference Manual. DESCRIPTION Thread-aware fgetc(3).
System Functions (s and S) spt_fgetcx(2) NAME spt_fgetcx - Gets a character from a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fgetcx ( FILE *stream ); PARAMETERS stream Points to the file structure of an open file. DESCRIPTION The spt_fgetcx( ) function is the thread-aware version of the fgetc( ) function.
spt_fgetcx(2) OSS System Calls Reference Manual [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device. [EIO] The call is attempting to read from the process’s controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [ENOMEM] Insufficient memory is available for the operation.
System Functions (s and S) spt_fgets(2) NAME spt_fgets - Initiates thread-aware fgets( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include char *spt_fgets( char *string, int n, FILE *stream); PARAMETERS See the fgets(3) reference page either online or in the Guardian C Native Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fgets( ) function.
spt_fgetsx(2) OSS System Calls Reference Manual NAME spt_fgetsx - Gets a string from a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char *spt_fgetsx ( char *string, int n, FILE *stream ); PARAMETERS string Points to a string to receive bytes. n Specifies an upper bound on the number of bytes to read.
System Functions (s and S) spt_fgetsx(2) [EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal which was caught and no data was transferred. [EIO] The call is attempting to read from the process’s controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [ENOMEM] Insufficient memory is available for the operation.
spt_fgetwc(2) OSS System Calls Reference Manual NAME spt_fgetwc - Initiates thread-aware fgetwc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fgetwc( FILE *stream); PARAMETERS See the fgetwc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fgetwc( ) function.
System Functions (s and S) spt_fgetwcx(2) NAME spt_fgetwcx - Gets a wide character from a a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_fgetwcx ( FILE *stream ); PARAMETERS stream Specifies the input data. DESCRIPTION The spt_fgetwcx( ) function is the thread-aware version of the fgetwc( ) function.
spt_fgetwcx(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) SPT_FILE_CLOSE_(2) NAME SPT_ FILE_CLOSE_ - closes an open Guardian file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_FILE_CLOSE_ ( short filenum, [short tape_disposition ] ); PARAMETERS filenum specifies the file number of a Guardian file open instance that identifies the file to be closed.
SPT_FILE_CLOSE_(2) OSS System Calls Reference Manual Closing a nowait file open If an SPT_FILE_CLOSE_( ) call is executed for a nowait file that has pending operations, any incomplete operations are canceled. There is no indication as to whether the operation completed or not. Labeled tape processing If your system has labeled tape processing enabled, all tape actions (as specified by tape_disposition) wait for completion.
System Functions (s and S) spt_FileIOHandler_p(2) NAME spt_FileIOHandler_p - Executes callback type required by spt_regFileIOHandler( ) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual NAME SPT_FILE_OPEN_ - Establishes a communication path between an application process and a file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_FILE_OPEN_(2) 1 Read only 2 Write only 3 Extend (supported only for tape) The default is 0 (zero). exclusion Specifies the desired mode of compatibility with other openers of the file. Valid values are: 0 Shared 1 Exclusive 2 Process exclusive 3 Protected The default is 0 (zero). nowait_depth Specifies whether input/output operations are to be nowait.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual process pair Specifies whether or not an I/O operation is automatically redirected to the backup process if the primary process or its processor module fails. For processes, this parameter is called sync depth. The maximum value is determined by the process. The value must be at least 1 for an I/O operation to a remote process pair to recover from a network failure.
System Functions (s and S) SPT_FILE_OPEN_(2) 4 through 9 Reserved; specify 0 (zero). 10 Open an OSS file by its OSS pathname. Specifies that the file to be opened is identified by the pathname parameter. 11 Reserved; specify 0 (zero). 12 No transactions. For $RECEIVE, messages are not to include transaction identifiers. This bit must be 0 (zero) if bit 15 is 1. 13 I18N locale support. For $RECEIVE, data messages include internationalization locale information.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual primary_processhandle Indicates that the caller is requesting a backup open and specifies the process handle of the primary process that already has the file open when its backup attempts to open the file. If this parameter is supplied and not null (a null process handle has -1 in each word), filenum must contain the filenum value that was returned to the primary.
System Functions (s and S) SPT_FILE_OPEN_(2) • are independent • might arrive in either order at the destination • might complete in either order Multiple opens on a given file can create a deadlock. Locks are granted on an open file (that is, file number) basis. Therefore, if a process has multiple opens of the same file, a lock of one file number excludes access to the file through other file numbers. The process is suspended forever if the default locking mode is in effect and a deadlock occurs.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual nowait to a process; the opener does not wait for the process being opened to service the open message. Direct and buffered I/O transfers A file opened by SPT_FILE_OPEN_( ) uses direct I/O transfers by default; SETMODE 72 is used to force the system to use an intermediate buffer in the process file segment (PFS) for I/O transfers. This is unlike the obsolescent Guardian OPEN procedure call, which uses a PFS buffer for I/O transfers by default.
System Functions (s and S) SPT_FILE_OPEN_(2) for read-write access read and write security levels are checked. A Guardian file has one of seven levels of security for each access mode. (The owner of the file can set the security level for each access mode by using SETMODE function 1 or by using the File Utility Program SECURE command.) The following table shows the seven levels of security: Table 7−2.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual Any other user, local access XXXYXXY If the caller to SPT_FILE_OPEN_( ) fails the security check, the open fails with an error 48. A file’s security can be obtained by a call to the Guardian FILE_GETINFOLIST[BYNAME]_ procedure, the FILEINFO procedure, or by the File Utility Program (FUP) INFO command. If you are using the Safeguard product, this security information might not apply.
System Functions (s and S) SPT_FILE_OPEN_(2) accessed again in its structured form. (HP reserves the right to change this block format at any time.) Refer to the Enscribe Programmer’s Guide for information about Enscribe block formats.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual Considerations for Terminals The terminal being used as the operator console should not be opened with exclusive access. If it is, console messages are not logged. Interprocess Communication Considerations Maximum concurrent nowait operations for an open of $RECEIVE The maximum number of concurrent nowait operations permitted for an open of $RECEIVE is 1. Attempting to open $RECEIVE and to specify a value greater than 1 causes an error 28 to be returned.
System Functions (s and S) SPT_FILE_OPEN_(2) Opening an unconverted (C-series format) process from a high-PIN process A high-PIN process cannot open an unconverted process unless the unconverted process has the HIGHREQUESTERS object-file attribute set. If a high-PIN process attempts to open a low-PIN process that does not have this attribute set, the high-PIN process receives file-system error 560.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual Some error numbers are warnings (that is, they indicate conditions that do not prevent the file from being opened); check the value returned for the filenum parameter to determine whether the file was opened successfully. See the Guardian Procedure Errors and Messages Manual for an explanation of other error numbers returned. ERRORS None. This function does not set the errno variable.
System Functions (s and S) spt_fork(2) NAME spt_fork - Initiates a thread-aware fork() operation LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include pid_t spt_fork( void ); PARAMETERS None. DESCRIPTION This is a thread-aware version of the fork( ) function call that creates a new process from the current thread.
spt_fprintf(2) OSS System Calls Reference Manual NAME spt_fprintf - Initiates thread-aware fprintf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fprintf( FILE *stream, const char *format, ...); PARAMETERS See the fprintf(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fprintf( ) function.
System Functions (s and S) spt_fprintfx(2) NAME spt_fprintfx - Prints formatted output to an output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fprintfx ( FILE *stream, const char *format [, value] . . . ); PARAMETERS stream Points to a FILE structure specifying an open stream to which converted values will be written.
spt_fprintfx(2) • OSS System Calls Reference Manual - Left align within the field the result of the conversion. + Begin the result of a signed conversion with a sign (+ or -). (space) Prefix a space character to the result if the first character of a signed conversion is not a sign. If both the (space) and + flags appear, the (space) flag is ignored. # Convert the value to an alternate form. For o conversion, it increases the precision to force the first digit of the result to be a 0 (zero).
System Functions (s and S) • spt_fprintfx(2) An optional h, l, ll, or L indicating the size of the argument corresponding to the following integer or floating-point conversion specifier: — An h followed by a d, i, o, u, x, or X conversion specifier indicates that the argument will be treated as a short int or unsigned short int. — An h followed by an n conversion specifier indicates that the argument will be treated as a pointer to a short int.
spt_fprintfx(2) 7−154 OSS System Calls Reference Manual x or X Accepts an integer (int) value and converts it to unsigned hexadecimal notation. The letters abcdef are used for the x conversion and the letters ABCDEF are used for the X conversion. The precision specifies the minimum number of digits to appear. If the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1.
System Functions (s and S) spt_fprintfx(2) S Accepts a pointer to an array of wchar_t type. Wide characters from the array are converted to an array of bytes containing multibyte characters and the multibyte characters up to (but not including) the null character are printed. If a precision is specified, then no more than the number of bytes specified by the precision are printed.
spt_fprintfx(2) OSS System Calls Reference Manual This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values in the native environment. IEEE values can include NaN and infinity, and the sign of 0.0 (zero) can be either positive or negative. Refer to the fp_class(3) reference page for a description of IEEE value classes. Guardian functions are available to convert between floating-point formats.
System Functions (s and S) spt_fprintfx(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
fputwc(3) OSS System Calls Reference Manual NAME fputwc - Writes a wide character to a specified stream LIBRARY G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL G-series native OSS processes: /G/system/sysnn/zcrtlsrl H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL H-series OSS processes: /G/system/zdllnnn/zcrtldll SYNOPSIS #include wint_t fputwc( wint_t c, FILE *stream); PARAMETERS c Specifies the wide character to be written. stream Points to the output data.
System Functions (s and S) fputwc(3) [ENOMEM] Insufficient storage space is available. [ENOSPC] There was no free space remaining on the device containing the file. [ENXIO] A request was made of a non-existent device, or the request was outside the capabilities of the device. [EPIPE] An attempt was made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
spt_fputc(2) OSS System Calls Reference Manual NAME spt_fputc - Thread-aware fputc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fputc( int c, FILE *stream); PARAMETERS See the fputc(3) man page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fputc( ) function.
System Functions (s and S) spt_fputcx(2) NAME spt_fputcx - Writes a byte to a specified output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fputcx ( int c, FILE *stream ); PARAMETERS c Specifies the character to be written. stream Points to the file structure of an open file.
spt_fputcx(2) OSS System Calls Reference Manual RETURN VALUES The spt_fputcx( ) function, upon successful completion, returns the value written. If this function fails, it returns the constant EOF and sets errno. If the file descriptor underlying stream becomes invalid (is closed by another thread), EOF is returned with an errno value of [EBADF]. If a signal is received via pthread_kill(2) that is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR].
System Functions (s and S) spt_fputcx(2) RELATED INFORMATION Functions: ferror(3), fputc(3), getc(3), getwc(3), printf(3), putc(3), putchar(3), puts(3), putwc(3), spt_getcx(2), spt_getwcx(2), spt_printfx(2), spt_putcx(2), spt_putcharx(2), spt_putsx(2), spt_putwcx(2), spt_writex(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
spt_fputs(2) OSS System Calls Reference Manual NAME spt_fputs - Initiates thread-aware fputs( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_fputs( const char *string, FILE *stream); PARAMETERS See the fputs(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fputs( ) function.
System Functions (s and S) spt_fputsx(2) NAME spt_fputsx - Writes a string to a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fputsx ( const char *string, FILE *stream ); PARAMETERS string Points to a string to be written to output. stream Points to the FILE structure of an open file.
spt_fputsx(2) OSS System Calls Reference Manual [EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the process would be delayed in the write operation. [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
System Functions (s and S) spt_fputwc(2) NAME spt_fputwc - Thread-aware fputwc( ) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_fputwc( wint_t c, FILE *stream); PARAMETERS See fputwc(3) refrence page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the fputwc( ) function.
spt_fputwcx(2) OSS System Calls Reference Manual NAME spt_fputwcx - Writes a wide character to a specified stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_fputwcx ( wint_t c, FILE *stream ); PARAMETERS c Specifies the wide character to be written. stream Points to the output data.
System Functions (s and S) spt_fputwcx(2) [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
spt_fread(2) OSS System Calls Reference Manual NAME spt_fread - Initiates thread-aware fread( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include size_t spt_fread( void *pointer, size_t size, size_t num_items, FILE *stream); PARAMETERS See the fread(3) reference page either online or in the Open System Services Library Calls Reference Manual.
System Functions (s and S) spt_freadx(2) NAME spt_freadx - Reads input from a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include size_t spt_freadx ( void ∗ pointer, size_t size, size_t num_items, FILE ∗ stream ); PARAMETERS pointer Points to an array. size Specifies the size of the variable type of the array pointed to by the pointer parameter.
spt_freadx(2) OSS System Calls Reference Manual and is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR]. ERRORS The spt_freadx( ) function fails if: • The stream parameter is not open for reading. • The stream is unbuffered. • The stream’s buffer needed to be flushed and the function call caused an underlying spt_writex( ) or lseek( ) to be invoked and this underlying operation fails.
System Functions (s and S) spt_fwrite(2) NAME spt_fwrite - Initiates thread-aware fwrite( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_fwrite( const void *pointer, size_t size, size_t num_items, FILE *stream); PARAMETERS See the fwrite(3) reference page either online or in the Open System Services Library Calls Reference Manual.
spt_fwritex(2) OSS System Calls Reference Manual NAME spt_fwritex - Writes to an output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include size_t spt_fwritex ( const void ∗ pointer, size_t size, size_t num_items, FILE ∗ stream ); PARAMETERS pointer Points to an array.
System Functions (s and S) spt_fwritex(2) ERRORS The spt_fwritex( ) function fails if: • The stream parameter is not open for writing. • The output file size cannot be increased. • The stream is unbuffered. • The stream’s buffer needed to be flushed and the function call caused an underlying spt_writex( ) or lseek( ) to be invoked and this underlying operation fails.
spt_fwritex(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) spt_generateTag(2) NAME spt_generateTag - Increments and returns a static long tag LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include long spt_generateTag(void); PARAMETERS None. DESCRIPTION Increments and returns a static long string appropriate for use as a tag. Note that this long string will eventually wrap, thereby returning tags that may still be in use.
spt_getc(2) OSS System Calls Reference Manual NAME spt_getc - Initiates thread-aware getc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getc( FILE *stream); PARAMETERS See the getc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getc( ) function.
System Functions (s and S) spt_getchar(2) NAME spt_getchar - Executes thread-aware getchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getchar(void); PARAMETERS See the getchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getchar( ) function.
spt_getcharx(2) OSS System Calls Reference Manual NAME spt_getcharx - Gets a character from the standard input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_getcharx (void); PARAMETERS None. DESCRIPTION The spt_getcharx( ) function is the thread-aware version of the getchar( ) function.
System Functions (s and S) spt_getcharx(2) [EINTR] The read operation was interrupted by a signal which was caught and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device. [EIO] The call is attempting to read from the process’s controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [ENOMEM] Insufficient memory is available for the operation.
spt_getcx(2) OSS System Calls Reference Manual NAME spt_getcx - Gets a character from a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_getcx ( FILE ∗ stream ); PARAMETERS stream Points to the FILE structure of an open file. DESCRIPTION The spt_getcx( ) function is the thread-aware version of the getc( ) function.
System Functions (s and S) spt_getcx(2) [EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal which was caught and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device.
spt_gets(2) OSS System Calls Reference Manual NAME spt_gets - Initiates thread-aware gets( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_gets( FILE *stream); PARAMETERS See the gets(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the gets(3) function.
System Functions (s and S) spt_getsx(2) NAME spt_getsx - Gets a string from the standard input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char ∗ spt_getsx ( char ∗ string ); PARAMETERS string Points to a string to receive bytes. DESCRIPTION The spt_getsx( ) function is the thread-aware version of the gets( ) function.
spt_getsx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal which was caught and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device.
System Functions (s and S) spt_getTMFConcurrentTransactions(2) NAME spt_getTMFConcurrentTransactions - Gets the number of concurrent TMF transactions being used LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getTMFConcurrentTransactions ( void ); PARAMETERS None. DESCRIPTION This function gets the number of concurrent TMF transactions being used.
spt_getw(2) OSS System Calls Reference Manual NAME spt_getw - Initiates thread-aware getw( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getw( FILE *stream); PARAMETERS See the getw(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getw( ) function.
System Functions (s and S) spt_getwc(2) NAME spt_getwc - Initiates thread-aware getwc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_getwc( FILE *stream); PARAMETERS See the getwc(3) reference page either online or in the Open System Services Library Calls Refrence Manual. DESCRIPTION This is a thread-aware version of the getwc( ) function.
spt_getwchar(2) OSS System Calls Reference Manual NAME spt_getwchar - Initiates thread-aware getwchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_getwchar(void); PARAMETERS See the getwchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getwchar(3) function.
System Functions (s and S) spt_getwcharx(2) NAME spt_getwcharx - Gets a wide character from the standard input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_getwcharx (void); PARAMETERS None. DESCRIPTION The spt_getwcharx( ) function is the thread-aware version of the getwchar( ) function.
spt_getwcharx(2) OSS System Calls Reference Manual The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_getwcx(2) NAME spt_getwcx - Gets a wide character from a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_getwcx ( FILE *stream ); PARAMETERS stream Specifies the input data. DESCRIPTION The spt_getwcx( ) function is the thread-aware version of the getwc( ) function.
spt_getwcx(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) spt_getwx(2) NAME spt_getwx - Gets a word from an input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_getwx ( FILE *stream ); PARAMETERS stream Points to the file structure of an open file. DESCRIPTION The spt_getwx( ) function is the thread-aware version of the getw( ) function.
spt_getwx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying the stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal which was caught and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device.
System Functions (s and S) spt_INITRECEIVE(2) NAME spt_INITRECEIVE - Registers $RECEIVE filename LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_interrupt(2) OSS System Calls Reference Manual NAME spt_interrupt - Interrupts all threads awaiting input or output LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_interrupt( const short filenum, const spt_error_t errorSPT); PARAMETERS filenum Specifies the Guardian file number for thev file whose awaiting I/O is to be interrupted.
System Functions (s and S) spt_interruptTag(2) NAME spt_interruptTag - Interrupts thread awaiting tagged I/O LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
SPT_LOCKFILE(2) OSS System Calls Reference Manual NAME SPT_LOCKFILE - excludes other users from accessing a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_LOCKFILE ( short filenum, [ long tag ] ); PARAMETERS filenum specifies the file number of a Guardian disk file open instance that identifies the file to be locked tag is for nowait I/O only.
System Functions (s and S) SPT_LOCKFILE(2) Locking modes Default mode If the file is already locked by another user when SPT_LOCKFILE( ) is called, the process requesting the lock is suspended and queued in a locking queue behind other users trying to access the file. When the file becomes unlocked, the user at the head of the locking queue is granted access to the file. If the user at the head of the locking queue is requesting a lock, it is granted the lock and resumes execution.
SPT_LOCKFILE(2) OSS System Calls Reference Manual RETURN VALUES The SPT_LOCKFILE( ) function returns 0 (zero) upon successful completion. Otherwise, this function returns a nonzero Guardian file-system error number that indicates the outcome of the operation. For information about Guardian file-system error numbers, see the Guardian Procedure Errors and Messages Manual. ERRORS None. This function does not set the errno variable.
System Functions (s and S) SPT_LOCKREC(2) NAME SPT_LOCKREC - excludes other users from accessing a record in a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_LOCKREC(2) OSS System Calls Reference Manual Considerations Record locking versus file locking A call to SPT_LOCKFILE( ) is not equivalent to locking all records in a file; that is, locking all records still allows insertion of new records, but file locking does not. File locks and record locks are queued in the order they are issued.
System Functions (s and S) SPT_LOCKREC(2) a Guardian file-system error 46 (invalid key) occurred. However, if an intermediate call to SPT_READX( ) is performed, the call to SPT_LOCKREC( ) is permitted because a unique record is identified. Current-state indicators after SPT_LOCKREC( ) After a successful call to SPT_LOCKREC( ), current-state indicators are unchanged.
SPT_LOCKREC(2) OSS System Calls Reference Manual SPT_WRITEUPDATEX(2), SPT_WRITEX(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) spt_OSSFileIOHandler_p(2) NAME spt_OSSFileIOHandler_p - Executes callback type required by the spt_regOSSFileIOHandler( function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_printf(2) OSS System Calls Reference Manual NAME spt_printf - Initiates thread-aware printf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_printf( const char *format, ...); PARAMETERS See the printf(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the printf( ) function.
System Functions (s and S) spt_printfx(2) NAME spt_printfx - Prints formatted output to the standard output stream (thread-aware function) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_printfx ( const char *format [, value] . . . ); PARAMETERS format Specifies a character string combining literal characters with conversion specifications.
spt_printfx(2) • OSS System Calls Reference Manual + Begin the result of a signed conversion with a sign (+ or -). (space) Prefix a space character to the result if the first character of a signed conversion is not a sign. If both the (space) and + flags appear, the (space) flag is ignored. # Convert the value to an alternate form. For o conversion, it increases the precision to force the first digit of the result to be a 0 (zero).
System Functions (s and S) • spt_printfx(2) An optional h, l, ll, or L indicating the size of the argument corresponding to the following integer or floating-point conversion specifier: — An h followed by a d, i, o, u, x, or X conversion specifier indicates that the argument will be treated as a short int or unsigned short int. — An h followed by an n conversion specifier indicates that the argument will be treated as a pointer to a short int.
spt_printfx(2) 7−212 OSS System Calls Reference Manual x or X Accepts an integer (int) value and converts it to unsigned hexadecimal notation. The letters abcdef are used for the x conversion and the letters ABCDEF are used for the X conversion. The precision specifies the minimum number of digits to appear. If the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1.
System Functions (s and S) spt_printfx(2) S Accepts a pointer to an array of wchar_t type. Wide characters from the array are converted to an array of bytes containing multibyte characters and the multibyte characters up to (but not including) the null character are printed. If a precision is specified, then no more than the number of bytes specified by the precision are printed.
spt_printfx(2) OSS System Calls Reference Manual This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values in the native environment. IEEE values can include NaN and infinity, and the sign of 0.0 (zero) can be either positive or negative. Refer to the fp_class(3) reference page for a description of IEEE value classes. Guardian functions are available to convert between floating-point formats.
System Functions (s and S) spt_printfx(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
spt_putc(2) OSS System Calls Reference Manual NAME spt_putc - Initiates thread-aware putc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_putc( int c, FILE *stream); PARAMETERS See the putc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putc( ) function.
System Functions (s and S) spt_putchar(2) NAME spt_putchar - Initiates thread-aware putchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern int spt_putchar( int c); PARAMETERS See the putchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putchar( ) function.
spt_putcharx(2) OSS System Calls Reference Manual NAME spt_putcharx - Writes a byte to the standard output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putcharx ( int cO ); PARAMETERS c Specifies the character to be written. DESCRIPTION The spt_putcharx( ) function is the thread-aware version of the putchar( ) function.
System Functions (s and S) spt_putcharx(2) RETURN VALUES The spt_putcharx( ) function and macro, upon successful completion, returns the value written. If this function or macro fails, it returns the constant EOF. The function sets errno when an error is encountered. If the file descriptor underlying stdout becomes invalid (is closed by another thread), EOF is returned with an errno value of [EBADF].
spt_putcharx(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: ferror(3), fputc(3), getc(3), getwc(3), printf(3), putc(3), putchar(3), puts(3), putwc(3), spt_fputcx(2), spt_getcx(2), spt_getwcx(2), spt_printfx(2), spt_putcx(2), spt_putsx(2), spt_putwcx(2), spt_writex(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (s and S) spt_putcx(2) NAME spt_putcx - Writes a byte to a specified output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putcx ( int c, FILE *stream ); PARAMETERS c Specifies the character to be written. stream Points to the file structure of an open file.
spt_putcx(2) OSS System Calls Reference Manual work: spt_putcx(*f++) When a function is necessary, use the spt_fputcx( ) function instead. RETURN VALUES The spt_putcx( ) function and macro, upon successful completion, returns the value written. If this function or macro fails, it returns the constant EOF. The function sets errno when an error is encountered. If the file descriptor underlying stream becomes invalid (is closed by another thread), EOF is returned with an errno value of [EBADF].
System Functions (s and S) spt_putcx(2) reference page either online or in the Open System Services System Calls Reference Manual for information about the cause of that error. RELATED INFORMATION Functions: ferror(3), fputc(3), getc(3), getwc(3), printf(3), putc(3), putchar(3), puts(3), putwc(3), spt_fputcx(2), spt_getcx(2), spt_getwcx(2), spt_printfx(2), spt_putcharx(2), spt_putwcx(2), spt_writex(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification.
spt_puts(2) OSS System Calls Reference Manual NAME spt_puts - Initiates thread-aware puts( ) function. LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_puts( const char *string); PARAMETERS See the puts(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the puts( ) function.
System Functions (s and S) spt_putsx(2) NAME spt_putsx - Writes a string to the standard output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putsx ( const char *string ); PARAMETERS string Points to a string to be written to output. DESCRIPTION The spt_putsx( ) function is the thread-aware version of the puts( ) function.
spt_putsx(2) OSS System Calls Reference Manual [EBADF] The file descriptor of the underlying stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
System Functions (s and S) spt_putw(2) NAME spt_putw - Initiates thread-aware putw( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_putw( int c, FILE *stream); PARAMETERS See the putw(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putw( ) function.
spt_putwc(2) OSS System Calls Reference Manual NAME spt_putwc - Initiates thread-aware putwc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_putwc( wint_t c, FILE *stream); PARAMETERS See the putwc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putwc( ) function.
System Functions (s and S) spt_putwchar(2) NAME spt_putwchar - Initiates thread-aware fputwchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_putwchar( wint_t c); PARAMETERS See the putwchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putwchar( ) function.
spt_putwcharx(2) OSS System Calls Reference Manual NAME spt_putwcharx - Writes a wide character to the standard output stream (thread-aware) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_putwcharx ( wint_t c ); PARAMETERS c Specifies the wide character to be written. DESCRIPTION The spt_putwcharx( ) function is the thread-aware version of the putwchar( ) function.
System Functions (s and S) spt_putwcharx(2) [EBADF] The file descriptor underlying the standard output stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EILSEQ] The wide character code specified by the c parameter does not correspond to a valid character. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
spt_putwcx(2) OSS System Calls Reference Manual NAME spt_putwcx - Writes a wide character to a specified stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_putwcx ( wint_t c, FILE *stream ); PARAMETERS c Specifies the wide character to be written. stream Points to the output data.
System Functions (s and S) spt_putwcx(2) [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EILSEQ] The wide character code specified by the c parameter does not correspond to a valid character. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
spt_putwx(2) OSS System Calls Reference Manual NAME spt_putwx - Writes a word to a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putwx ( int w, FILE *stream ); PARAMETERS stream Points to the file structure of an open file. w Specifies the word to be written.
System Functions (s and S) spt_putwx(2) #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK RETURN VALUES The spt_putwx( ) function, upon successful completion, returns a value of 0 (zero). Otherwise, it returns a nonzero value. If the file descriptor underlying stream becomes invalid (is closed by another thread), a nonzero value is returned with an errno value of [EBADF].
spt_read(2) OSS System Calls Reference Manual NAME spt_read - Initiates thread-aware read( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_read( int filedes, void *buffer, size_t nbytes); PARAMETERS See the read(2) reference page. DESCRIPTION This is a thread-aware version of the read( function. Note that file descriptor must be nonblocking for this function to be thread-aware.
System Functions (s and S) SPT_READLOCKX(2) NAME SPT_READLOCKX - sequentially locks and reads records in a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_READLOCKX(2) OSS System Calls Reference Manual Use for key-sequenced, relative, and entry-sequenced files For key-sequenced, relative, and entry-sequenced files, a subset of the file (defined by the current access path, positioning mode, and comparison length) is locked and read with successive calls to SPT_READLOCKX( ). For key-sequenced, relative, and entry-sequenced files, the first call to SPT_READLOCKX( ) after a positioning (or open) locks and then returns the first record of the subset.
System Functions (s and S) SPT_READLOCKX(2) • Nowait I/O initiated with SPT_READLOCKX( ) can be canceled with a call to SPT_CANCEL( ) or CANCELREQ. The I/O is canceled if the file is closed before the I/O completes or if the Guardian AWAITIOX procedure is called with a positive time limit and specific file number and the request times out.
SPT_READUPDATELOCKX(2) OSS System Calls Reference Manual NAME SPT_READUPDATELOCKX - allows random processing of records in a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_READUPDATELOCKX(2) Nowait I/O and SPT_READUPDATELOCKX( ) The SPT_READUPDATELOCKX( ) function must complete with a corresponding call to the Guardian AWAITIOX procedure when used with a file that is opened nowait. Use on nondisk files If SPT_READUPDATELOCKX( ) is performed on nondisk files, an error is returned. Random processing For key-sequenced, relative, and entry-sequenced files, random processing implies that a designated record must exist.
SPT_READUPDATELOCKX(2) OSS System Calls Reference Manual Use of buffers A file opened by SPT_FILE_OPEN_( ) uses direct I/O transfers by default; you can use SPT_SETMODE(72) to force the system to use an intermediate buffer in the process file segment (PFS) for I/O transfers. Bounds checking If the extended address of buffer is odd, bounds checking rounds the address to the next lower word boundary and checks an extra byte as well. The odd address is used for the transfer.
System Functions (s and S) SPT_READUPDATEX(2) NAME SPT_READUPDATEX - reads data from a Guardian disk or process file in anticipation of a subsequent write to the file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_READUPDATEX(2) OSS System Calls Reference Manual For programming information about the READUPDATEX procedure, see the Enscribe Programmer’s Guide and the Guardian Programmer’s Guide. Considerations Buffer use SPT_READUPDATEX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_READUPDATEX( ) can be either in the caller’s stack segment or any extended data segment.
System Functions (s and S) SPT_READUPDATEX(2) ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: SPT_CANCEL(2), SPT_CONTROL(2), SPT_FILE_CLOSE_(2), SPT_FILE_OPEN_(2), SPT_LOCKFILE(2), SPT_LOCKREC(2), SPT_READLOCKX(2), SPT_READUPDATELOCKX(2), SPT_READX(2), SPT_SETMODE(2), SPT_UNLOCKFILE(2), SPT_UNLOCKREC(2), SPT_WRITEREADX(2), SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2).
spt_readv(2) OSS System Calls Reference Manual NAME spt_readv - Initiates thread-aware readv( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_readv( int filedes, struct iovec *iov, int iov_count); PARAMETERS See the readv(2) reference page. DESCRIPTION This is a thread-aware version of the readv( ) function.
System Functions (s and S) spt_readvx(2) NAME spt_readvx - Reads from a file into scattered buffers (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
spt_readvx(2) • OSS System Calls Reference Manual If some process has the pipe open for writing: — If the O_NONBLOCK flag is not set, the spt_readvx( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing. — If the O_NONBLOCK flag is set, the spt_readvx( ) function returns the value -1 and sets errno to [EAGAIN].
System Functions (s and S) spt_readvx(2) NOTES The macro to map readv( ) to spt_readvx( ) is available in C applications when SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_NONBLOCK The alias to link readv( ) to spt_readvx( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.
spt_readvx(2) OSS System Calls Reference Manual [EINTR] An spt_readvx( ) operation was interrupted by a signal before any data arrived. [EINVAL] One of these conditions occurred: [EIO] [EISDIR] • The sum of the iov_len values in the iov array was negative or overflowed a data item of type ssize_t. • The value of the iov_count parameter was less than or equal to 0 (zero) or greater than IOV_MAX.
System Functions (s and S) spt_readvx(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
SPT_READX(2) OSS System Calls Reference Manual NAME SPT_READX - returns data from an open Guardian file to the application process data area LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_READX(2) Nowait SPT_READX( ) If a nowait SPT_READX( ) call is executed, count_read has no meaning and can be omitted. The count of the number of bytes read is obtained through the count-transferred parameter of the Guardian AWAITIOX procedure when the I/O operation completes. The SPT_READX( ) function must complete with a call to the Guardian AWAITIOX procedure when it is used with a file that is opened nowait.
SPT_READX(2) OSS System Calls Reference Manual • If the I/O has been initiated with SPT_READX( ), the I/O must be completed with a call to the Guardian AWAITIOX procedure. • A selectable extended data segment containing the buffer need not be in use at the time of the call to AWAITIOX. • Nowait I/O initiated with SPT_READX( ) can be canceled with a call to SPT_CANCEL( ) or CANCELREQ.
System Functions (s and S) SPT_READX(2) Structured files a subset of records for sequential SPT_READX( ) calls The subset of records read by a series of calls to SPT_READX( ) is specified through calls to the Guardian POSITION or KEYPOSITION procedures. reading of an approximate subset of records If an approximate subset is being read, the first record returned is the one whose key field, as indicated by the current key specifier, contains a value equal to or greater than the current key.
SPT_READX(2) OSS System Calls Reference Manual odd unstructured If the unstructured file is created with the odd unstructured attribute (also known as ODDUNSTR) set, the number of bytes read is exactly the number of bytes specified with read_count. If the odd unstructured attribute is not set when the file is created, the value of read_count is rounded up to an even number before the SPT_READX( ) operation is executed.
System Functions (s and S) SPT_READX(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
spt_readx(2) OSS System Calls Reference Manual NAME spt_readx - Reads from a file (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (s and S) spt_readx(2) setting of O_NONBLOCK. When attempting to read from an empty pipe (or FIFO file): • If no process has the pipe open for writing, the spt_readx( ) function returns the value 0 (zero) to indicate EOF. • If some process has the pipe open for writing: — If the O_NONBLOCK flag is not set, the spt_readx( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing.
spt_readx(2) OSS System Calls Reference Manual SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK RETURN VALUES Upon successful completion, the spt_readx( ) function returns the number of bytes actually read and placed into the buffer. The function guarantees to read the number of bytes requested only if the descriptor references a regular file that has at least that number of bytes left before EOF.
System Functions (s and S) [EISDIR] spt_readx(2) An spt_readx( ) operation was attempted against a directory. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOTCONN] The socket is no longer connected to a peer socket. [ETIMEDOUT] Data transmission on the socket timed out.
spt_RECEIVEREAD(2) OSS System Calls Reference Manual NAME spt_RECEIVEREAD - Initiates thread-aware function for reading $RECEIVE LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) spt_RECEIVEREAD(2) • spt_interrupt(0, SPT_ERROR). • spt_interrupt(0, SPT_TIMEDOUT). Using any of these calls also cancels the input/output operation. RETURN VALUES This function returns Guardian file-system error numbers including: 16 filenum is not registered. STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
spt_recv(2) OSS System Calls Reference Manual NAME spt_recv - Initiates thread-aware recv( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_recv( int socket, void *buffer, size_t length, int flags); PARAMETERS See the recv(2) reference page. DESCRIPTION This is a thread-aware version of the recv( ) function. The socket must be nonblocking for this function to be thread-aware.
System Functions (s and S) spt_recvfrom(2) NAME spt_recvfrom - Initiates thread-aware recvfrom( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_recvfrom( int socket, void *buffer, size_t length, int flags, struct sockaddr *address, size_t *address_len); PARAMETERS See the recvfrom(2) reference page. DESCRIPTION This is a thread-aware version of the recvfrom( ) function.
spt_recvfromx(2) OSS System Calls Reference Manual NAME spt_recvfromx - Receives a message from a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_recvfromx ( int socket, void *buffer, size_t length, int flags, struct sockaddr *address, size_t *address_len ); PARAMETERS socket Specifies the file descriptor of the socket.
System Functions (s and S) spt_recvfromx(2) For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded. If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the spt_recvfromx( ) function blocks until a message arrives.
spt_recvfromx(2) OSS System Calls Reference Manual [EFAULT] A user-supplied memory buffer cannot be accessed or written. [EINTR] A signal interrupted the function before any data was available. [EINVAL] The MSG_OOB value is specified in the flags parameter and no out-of-band data is available. [EIO] An input or output error occurred. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time may succeed.
System Functions (s and S) spt_recvmsg(2) NAME spt_recvmsg - Initiates thread-aware recvmsg(2) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_recvmsg( int socket, struct msghdr *message, int flags); PARAMETERS See the recvmsg(2) reference page. DESCRIPTION This is a thread-aware version of the recvmsg( ) function. The socket must be nonblocking for this function to be thread-aware.
spt_recvmsgx(2) OSS System Calls Reference Manual NAME spt_recvmsgx - Receives a message from a socket using a message structure (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_recvmsgx ( int socket, struct msghdr *message, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
System Functions (s and S) spt_recvmsgx(2) of the msghdr structure. For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded. If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the spt_recvmsgx ) function blocks until a message arrives.
spt_recvmsgx(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the spt_recvmsgx( ) function returns the length of the received message in bytes. If no data is available and the peer socket has performed an orderly shutdown, 0 (zero) is returned. If the spt_recvmsgx( ) function call fails, the value -1 is returned, and errno is set to indicate the error. If the socket becomes invalid (is closed by another thread), -1 is returned with an errno value of [EBADF].
System Functions (s and S) spt_recvmsgx(2) [ENOTCONN] A receive operation was attempted on a connection-oriented socket that is not connected. [ENOTSOCK] The socket parameter does not refer to a socket. [EOPNOTSUPP] A specified value for the flags parameter is not supported for this socket type. [ETIMEDOUT] A transmission timed out on an active connection. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set), and the operation would block.
spt_recvx(2) OSS System Calls Reference Manual NAME spt_recvx - Receives a message from a connected socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_recvx ( int socket, void *buffer, size_t length, int flags ); PARAMETERS socket Specifies the file descriptor of the socket. buffer Points to the buffer where the message should be written.
System Functions (s and S) spt_recvx(2) #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK When data is available, a call to the select( ) function indicates that the file descriptor for the socket is ready for reading. Calling the spt_recvx( ) function with a flags parameter of 0 (zero) is identical to calling the spt_readx( ) function. RETURN VALUES Upon successful completion, the spt_recvx( ) function returns the length of the received message in bytes.
spt_recvx(2) OSS System Calls Reference Manual [ETIMEDOUT] A transmission timed out on an active connection. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set) and the operation would block. RELATED INFORMATION Functions: read(2), recv(2), recvfrom(2), recvmsg(2), select(2), send(2), sendmsg(2), sendto(2), shutdown(2), socket(2), spt_readx(2), spt_recv(2), spt_recvfromx(2), spt_recvmsgx(2), spt_sendtox(2), spt_sendx(2), spt_sendmsgx(2), spt_writex(2), write(2).
System Functions (s and S) spt_regFile(2) NAME spt_regFile - Registers the file number LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_regFile( const short filenum); PARAMETERS filenum Specifies the Guardian file number of the file being registered DESCRIPTION Registers the file number as one that the user will manage through the default callback.
spt_regFileIOHandler(2) OSS System Calls Reference Manual NAME spt_regFileIOHandler - Registers the file number LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_regFileIOHandler( const short filenum, const spt_FileIOHandler_p functionPtr); PARAMETERS filenum Specifies the Guardian file number for the file being registered functionPtr Specifies user-supplied callback.
System Functions (s and S) spt_regOSSFileIOHandler(2) NAME spt_regOSSFileIOHandler - Registers the file descriptor to manage through a callback function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_regPathsendFile(2) OSS System Calls Reference Manual NAME spt_regPathsendFile - Registers the Pathsend file number LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_regPathsendFile( const short fileno ); PARAMETERS fileno Contains the scsend-op-num value obtained during the first nowaited SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_, or SERVERCLASS_DIALOG_SEND_ procedure call.
System Functions (s and S) spt_regPathsendTagHandler(2) NAME spt_regPathsendTagHandler - Registers the user-supplied Pathsend tag LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_regPathsendTagHandler( const long tag, spt_FileIOHandler_p callback, void * userdata ); PARAMETERS tag Specifies the Pathsend tag that should be registered. callback Specifies a user-supplied callback function.
spt_regPathsendTagHandler(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: spt_unregPathsendTagHandler(2), SPT_SERVERCLASS_DIALOG_ABORT_(2), SPT_SERVERCLASS_DIALOG_BEGIN_(2), SPT_SERVERCLASS_DIALOG_END_(2), SPT_SERVERCLASS_DIALOG_SEND_(2), SPT_SERVERCLASS_SEND_INFO_(2), SPT_SERVERCLASS_SEND_(2). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (s and S) spt_regTimerHandler(2) NAME spt_regTimerHandler - Registers a user-supplied timer callback function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_REPLYX(2) OSS System Calls Reference Manual NAME spt_REPLYX - Initiates thread-aware REPLYX procedure call LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) spt_select(2) NAME spt_select - Initiates thread-aware select( ) function for mulitple file descriptors LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout); PARAMETERS See the select(2) reference page.
spt_select(2) OSS System Calls Reference Manual RETURN VALUES See the select(2) reference page. The following information also applies: • If the file descriptor becomes invalid (is closed by another thread), -1 is returned with an errno of [EBADF]. • If a signal is received via the pthread_kill( ) function and is not blocked, ignored, or handled, -1 is returned with an errno value of [EINTR]. RELATED INFORMATION Functions: select(2), spt_select_single_np(2).
System Functions (s and S) spt_select_single_np(2) NAME spt_select_single_np - Initiates thread-aware select( ) function for a single file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_select_single_np( int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout); PARAMETERS See the select(2) reference page.
spt_select_single_np(2) OSS System Calls Reference Manual NOTES To use a combination of the spt_select( ) and the spt_select_single_np( ) functions in a single source file, you must explicitly call these functions. RETURN VALUES See the select(2) reference page. The following also applies: • If the file descriptor becomes invalid (is closed by another thread), -1 is returned with an errno of [EBADF].
System Functions (s and S) spt_send(2) NAME spt_send - Initiates thread-aware send( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_send( int socket, const void *buffer, size_t length, int flags); PARAMETERS See the send(2) reference page. DESCRIPTION This is a thread-aware version of the send( ) function. The socket must be nonblocking for this function to be thread-aware.
spt_sendmsg(2) OSS System Calls Reference Manual NAME spt_sendmsg - Initiates thread-aware sendmsg( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_sendmsg( int socket, const struct msghdr *message, int flags); PARAMETERS See the sendmsg(2) reference page. DESCRIPTION This is a thread-aware version of the sendmsg( ) function.
System Functions (s and S) spt_sendmsgx(2) NAME spt_sendmsgx - Sends a message on a socket using a message structure (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_sendmsgx ( int socket, const struct msghdr *message, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
spt_sendmsgx(2) OSS System Calls Reference Manual Successful completion of a call to spt_sendmsgx( ) does not imply successful delivery of the message. A return value of -1 indicates only locally detected errors. If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the spt_sendmsgx( ) function blocks until space is available.
System Functions (s and S) spt_sendmsgx(2) [EAFNOSUPPORT] Addresses in the specified address family cannot be used with this socket. [EBADF] One of these conditions exists: • The socket parameter is not a valid file descriptor. • The socket is in the AF_UNIX domain, and one or more of the file descriptors being passed is invalid. [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available.
spt_sendmsgx(2) OSS System Calls Reference Manual [ELOOP] The socket is in the AF_UNIX domain, and too many symbolic links were encountered in translating the pathname specified by the msghdr structure. [EMSGSIZE] The message is too large to be sent all at once, as required by the socket. [ENAMETOOLONG] The socket is in the AF_UNIX domain, and one of these conditions exists: • The pathname in the msghdr structure exceeds PATH_MAX characters.
System Functions (s and S) spt_sendmsgx(2) [EPIPE] One of these conditions occurred: • An attempt was made to send a message on a socket that is shut down for writing. • An attempt was made to send a message on a connection-oriented socket, and the peer socket is closed or shut down for reading. The SIGPIPE signal is also sent to the calling process. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set), and the operation would block.
spt_sendto(2) OSS System Calls Reference Manual NAME spt_sendto - Initiates thread-aware sendto( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_sendto( int socket, const void *buffer, size_t length, int flags, const struct sockaddr *dest_addr, size_t dest_len); PARAMETERS See the sendto(2) reference page. DESCRIPTION This is a thread-aware version of the sendto( ) function.
System Functions (s and S) spt_sendtox(2) NAME spt_sendtox - Sends a message on a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_sendtox ( int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, size_t dest_len ); PARAMETERS socket Specifies the file descriptor of the socket.
spt_sendtox(2) OSS System Calls Reference Manual dest_len Specifies the length of the sockaddr structure pointed to by the dest_addr parameter. DESCRIPTION The spt_sendtox( ) function is the thread-aware version of the sendto( ) function. The spt_sendtox( ) function sends a message through a connection-oriented or connectionless socket. If the socket is connectionless, the message is sent to the address specified in the sockaddr structure pointed to by the dest_addr parameter.
System Functions (s and S) [EBADF] spt_sendtox(2) The socket parameter is not a valid file descriptor. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The socket can only be closed.
spt_sendtox(2) OSS System Calls Reference Manual [ENETDOWN] The local interface used to reach the destination is down. [ENETUNREACH] No route to the network or host is present. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time might succeed. [ENOENT] The socket is in the AF_UNIX domain and one of the following conditions exists: [ENOMEM] • A component of the pathname specified in the sockaddr structure does not name an existing file.
System Functions (s and S) spt_sendx(2) NAME send - Sends a message on a connected socket LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_sendx ( int socket, const void *buffer, size_t length, int flags ); PARAMETERS socket Specifies the file descriptor of the socket. buffer Points to the buffer containing the message to send.
spt_sendx(2) OSS System Calls Reference Manual NOTES The macro to map send( ) to spt_sendx( ) is available in C applications when SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_NONBLOCK The alias to link send( ) to spt_sendx( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.
System Functions (s and S) spt_sendx(2) [ENETDOWN] The local interface used to reach the destination is down. [ENETUNREACH] No route to the network or host is present. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed. [ENOTCONN] The socket either is not connected or has not had the peer socket previously specified.
SPT_SETMODE(2) OSS System Calls Reference Manual NAME SPT_SETMODE - sets device-dependent Guardian file-system functions LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_SETMODE(2) Waited SPT_SETMODE( ) use The SPT_SETMODE( ) function is used on a file as a waited operation even if filenum has been opened for nowait. Use the Guardian SETMODENOWAIT procedure for nowait operations. Use for Telserv processes No SPT_SETMODE( ) calls on Telserv are allowed before doing an SPT_CONTROL( ) function 11.
SPT_SETMODE(2) OSS System Calls Reference Manual SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) spt_setOSSFileIOHandler(2) NAME spt_setOSSFileIOHandler - Sets interest in file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_setTMFConcurrentTransactions(2) OSS System Calls Reference Manual NAME spt_setTMFConcurrentTransactions - Sets the number of concurrent TMF transactions LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_setTMFConcurrentTransactions ( short max_trans ); PARAMETERS max_trans Specifies the maximum number of concurrent transactions desired.
System Functions (s and S) spt_sleep(2) NAME spt_sleep - Suspends execution of the thread for a specified time interval LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include unsigned int spt_sleep ( unsigned int seconds ); PARAMETERS seconds Specifies the number of seconds for which the thread is to be suspended. DESCRIPTION The spt_sleep( ) function suspends a thread for a specified number of seconds.
spt_system(2) OSS System Calls Reference Manual NAME spt_system - Initiates thread-aware system( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_system( const char *command); PARAMETERS See the system(3) reference page. DESCRIPTION This is a thread-aware version of the system( ) function.
System Functions (s and S) spt_TimerHandler_p(2) NAME spt_TimerHandler_p - Executes callback type required by spt_regTimerHandler( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include typedef long (*spt_TimerHandler_p)(void); PARAMETERS None. DESCRIPTION This function executes a callback type required by the spt_regTimerHandler( ) function.
SPT_TMF_GetTxHandle(2) OSS System Calls Reference Manual NAME SPT_TMF_GetTxHandle - Gets the current TMF transaction handle LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include short SPT_TMF_GetTxHandle( SPT_TMF_TxHandle_t *tx_handle ); PARAMETERS tx_handle Receives the current active TMF transaction handle. DESCRIPTION This function retrieves the current active transaction handle of the thread.
System Functions (s and S) SPT_TMF_Init(2) NAME SPT_TMF_Init - Initializes the tfile for concurrent transaction management LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include short SPT_TMF_Init( void ); PARAMETERS None. DESCRIPTION This function opens the tfile for concurrent transaction management. RETURN VALUES SPT_SUCCESS The TMF file is initialized for concurrent transaction management.
SPT_TMF_SetTxHandle(2) OSS System Calls Reference Manual NAME SPT_TMF_SetTxHandle - Sets the TMF transaction handle LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include short SPT_TMF_SetTxHandle( SPT_TMF_TxHandle_t *tx_handle ); PARAMETERS tx_handle Specifies the transaction handle of the current TMF transaction.
System Functions (s and S) SPT_UNLOCKFILE(2) NAME SPT_UNLOCKFILE - unlocks a disk file and any records in that file currently locked by the user LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_UNLOCKFILE ( short filenum, [long tag ] ); PARAMETERS filenum specifies the Guardian file number of a Guardian file open instance for the file that you want unlocked.
SPT_UNLOCKFILE(2) OSS System Calls Reference Manual • read the file, its read is processed. Transaction Management Facility (TMF) and SPT_UNLOCKFILE( ) Locks on a file audited by TMF which has been modified by the current transaction are released only when the transaction is ended or aborted by TMF; in other words, a locked audited file which has been modified by the current transaction is unlocked during SPT_ENDTRANSACTION( ) or SPT_ABORTTRANSACTION( ) processing for that file.
System Functions (s and S) SPT_UNLOCKREC(2) NAME SPT_UNLOCKREC - unlocks a Guardian file record currently locked by the user LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_UNLOCKREC ( short filenum, [long tag ] ); PARAMETERS filenum specifies the Guardian file number of a Guardian file open instance for the file containing the record you want unlocked.
SPT_UNLOCKREC(2) OSS System Calls Reference Manual Calling SPT_UNLOCKREC( ) after KEYPOSITION If the call to SPT_UNLOCKREC( ) immediately follows a call to KEYPOSITION where a nonunique alternate key is specified, the SPT_UNLOCKREC( ) call fails. A subsequent call to FILE_GETINFO_ or FILEINFO shows that Guardian filesystem error 46 (invalid key) occurred. However, if an intermediate call to SPT_READX( ) or SPT_READLOCKX( ) is performed, the call to SPT_UNLOCKREC( ) is permitted.
System Functions (s and S) SPT_UNLOCKREC(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
spt_unregFile(2) OSS System Calls Reference Manual NAME spt_unregFile - Unregisters a Guardian file number as one that the user manages LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern spt_error_t spt_unregFile( const short filenum); PARAMETERS filenum Specifies the Guardian file number being unregistered DESCRIPTION This function unregisters a Guardian file number as one that the user manages.
System Functions (s and S) spt_unregOSSFileIOHandler(2) NAME spt_unregOSSFileIOHandler - Unregisters an OSS file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern spt_error_t spt_unregOSSFileIOHandler( const int filedes); PARAMETERS filedes Specifies the OSS file descriptor being unregistered DESCRIPTION This function unregisters an OSS file descriptor as one that the user manages.
spt_unregPathsendTagHandler(2) OSS System Calls Reference Manual NAME spt_unregPathsendTagHandler - Unregisters the user-supplied Pathsend tag LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_unregPathsendTagHandler ( const long tag ); PARAMETERS tag Specifies the Pathsend tag to be unregistered. DESCRIPTION This function unregisters the specified Pathsend tag as a tag that user manages.
System Functions (s and S) spt_usleep(2) NAME spt_usleep - Suspends execution of the thread for a specified number of microseconds LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_usleep ( unsigned int useconds ); PARAMETERS useconds Specifies the number of microseconds for which the thread is to be suspended. The value specified must be less than or equal to 1000000.
spt_vfprintf(2) OSS System Calls Reference Manual NAME spt_vfprintf - Initiates thread-aware vfprintf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_vfprintf( FILE *stream, const char *format, va_list printarg); PARAMETERS See the vfprintf(3) reference page either online or in the Open System Services Library Calls Reference Manual.
System Functions (s and S) spt_vfprintfx(2) NAME spt_vfprintfx - Formats a variable number of parameters for output (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include int spt_vfprintfx ( FILE *stream, const char *format, va_list printarg ); PARAMETERS stream Specifies the output stream.
spt_vfprintfx(2) OSS System Calls Reference Manual #include void { error(char *funct, char *fmt, ...) va_list args; /* ** Display the name of the function that called error */ spt_fprintfx(stderr, "ERROR in %s: ", funct); /* ** Display the remainder of the message */ va_start(args, fmt); spt_vfprintfx(stderr, fmt, args); va_end(args); abort(); } RETURN VALUES Upon successful completion, this function returns the number of bytes in the output string. Otherwise, a negative value is returned.
System Functions (s and S) spt_vfprintfx(2) [ENOMEM] Insufficient storage space was available. [ENOSPC] There was no free space remaining on the device containing the file. [ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device. [EPIPE] An attempt was made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
spt_vprintf(2) OSS System Calls Reference Manual NAME spt_vprintf - Initiates thread-aware vprintf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_vprintf( const char *format, va_list printarg); PARAMETERS See the vprintf(3) reference page either online or in the Open System Services Library Calls Reference manual. DESCRIPTION This is a thread-aware version of the vprintf( ) function.
System Functions (s and S) spt_vprintfx(2) NAME spt_vprintfx - Formats a variable number of parameters for output (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
spt_vprintfx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying the output stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EILSEQ] An invalid wide character was detected. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred. [EINVAL] There are insufficient arguments.
System Functions (s and S) spt_waitpid(2) NAME spt_waitpid - Initiates thread-aware waitpid( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include pid_t spt_waitpid( pid_t pid, int *stat_loc, int options); PARAMETERS See the waitpid(2) reference page. DESCRIPTION This is a thread-aware version of the waitpid( ) function. The socket must be nonblocking for this function to be thread-aware.
spt_waitpid(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference 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.
System Functions (s and S) spt_wakeup(2) NAME spt_wakeup - Wakes up a thread awaiting tagged I/O LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_write(2) OSS System Calls Reference Manual NAME spt_write - Initiates thread-aware write( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_write( int filedes, void *buffer, size_t nbytes); PARAMETERS See the write(2) reference page. DESCRIPTION This is a thread-aware version of the write( ) function. The file descriptor must be nonblocking for this function to be thread-aware.
System Functions (s and S) SPT_WRITEREADX(2) NAME SPT_WRITEREADX - writes data to a Guardian file from an array and waits for data to be read back from the file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_WRITEREADX(2) OSS System Calls Reference Manual Considerations Buffer use SPT_WRITEREADX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_WRITEREADX( ) can be either in the caller’s stack segment or any extended data segment. Terminals A special hardware feature is incorporated in the asynchronous multiplexer controller that ensures the system is ready to read from the terminal as soon as the write is completed.
System Functions (s and S) SPT_WRITEREADX(2) Use on files opened for nowait I/O • If the buffer is in an extended data segment, you cannot deallocate or reduce the size of the extended data segment before the I/O completes with a call to the Guardian AWAITIOX procedure or is canceled by a call to the SPT_CANCEL( ) function or the Guardian CANCELREQ procedure. • You must not modify the buffer before the I/O completes with a call to the Guardian AWAITIOX procedure.
SPT_WRITEREADX(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) SPT_WRITEUPDATEUNLOCKX(2) NAME SPT_WRITEUPDATEUNLOCKX - performs random processing of records in a disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_WRITEUPDATEUNLOCKX(2) OSS System Calls Reference Manual Considerations Buffer use SPT_WRITEUPDATEUNLOCKX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_WRITEUPDATEUNLOCKX( ) can be either in the caller’s stack segment or any extended data segment. Nowait I/O and SPT_WRITEUPDATEUNLOCKX( ) The SPT_WRITEUPDATEUNLOCKX( ) function must complete with a corresponding call to the Guardian AWAITIOX procedure when used with a file that is opened nowait.
System Functions (s and S) SPT_WRITEUPDATEUNLOCKX(2) Invalid write operations to queue files DP2 rejects SPT_WRITEUPDATEUNLOCKX( ) operations with a Guardian file-system error 2. Location of buffer and count_written The buffer and count transferred can be in the user stack or in an extended data segment. The buffer and count_written cannot be in the user code space. If the buffer and count_written is in a selectable extended data segment, the segment must be in use at the time of the call.
SPT_WRITEUPDATEUNLOCKX(2) OSS System Calls Reference Manual Use on OSS Objects This procedure operates only on Guardian objects. If an OSS file is specified, Guardian filesystem error 2 occurs. RETURN VALUES The SPT_WRITEUPDATEUNLOCKX( ) function returns 0 (zero) upon successful completion. Otherwise, this function returns a nonzero Guardian file-system error number that indicates the outcome of the operation.
System Functions (s and S) SPT_WRITEUPDATEX(2) NAME SPT_WRITEUPDATEX - transfers data from an array in the application program to a Guardian file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual application process’s array is written in that area. For programming information about the WRITEUPDATEX procedure, see the Enscribe Programmer’s Guide and the Guardian Programmer’s Guide. Considerations Buffer use SPT_WRITEUPDATEX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_WRITEUPDATEX( ) can be either in the caller’s stack segment or any extended data segment.
System Functions (s and S) SPT_WRITEUPDATEX(2) the initiation and completion of a nowait write operation. This is because a retry can copy the data again from the user buffer and cause the wrong data to be written. You should avoid sharing a buffer between a write and another I/O operation because this creates the possibility of changing the contents of the write buffer before the write is completed.
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual the odd unstructured attribute is not set when the file is created, the value of write_count is rounded up to an even value before the SPT_WRITEUPDATEX( ) call is executed. You set the odd unstructured attribute with the Guardian FILE_CREATE_, FILE_CREATELIST_, or CREATE procedure, or with the File Utility Program (FUP) SET and CREATE commands.
System Functions (s and S) SPT_WRITEUPDATEX(2) If the buffer or count transferred is in a selectable extended data segment, the segment must be in use at the time of the call. Flat segments allocated by a process are always accessible to the process.
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual Specifying the correct number of bytes written When SPT_WRITEUPDATEX( ) is used with magnetic tape, the number of bytes to be written must fit exactly; otherwise, information on the tape can be lost. However, no error indication is given. Limitation of SPT_WRITEUPDATEX( ) to the same record Five is the maximum number of times a SPT_WRITEUPDATEX( ) call can be executed to the same record on tape.
System Functions (s and S) spt_writev(2) NAME spt_writev - Initiate thread-aware writev( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_writev( int filedes, struct iovec *iov, int iov_count); PARAMETERS See the writev(2) reference page. DESCRIPTION This is a thread-aware version of the writev( ) function. The file descriptor must be nonblocking for this function to be thread-aware.
spt_writevx(2) OSS System Calls Reference Manual NAME spt_writevx - Writes to a file from scattered buffers (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (s and S) spt_writevx(2) this case, the number of bytes written is returned. For example, suppose there is space for 20 bytes more in a file before reaching a limit. A write request of 512 bytes returns a value of 20. The limit reached can be either the end of the physical medium or the value that has been set by the ulimit( ) function. The next write of a nonzero number of bytes gives a failure return (except as noted later).
spt_writevx(2) OSS System Calls Reference Manual written, or transfers no data and returns the value -1 with errno set to [EAGAIN]. Also, if a request is greater than PIPE_BUF bytes and all data previously written to the pipe has been read, writev( ) transfers at least PIPE_BUF bytes.
System Functions (s and S) spt_writevx(2) ERRORS If any of these conditions occurs, the spt_writevx( ) function sets errno to the corresponding value: [EAGAIN] [EBADF] One of these conditions occurred: • An attempt was made to write to a file descriptor that cannot accept data, and the O_NONBLOCK flag is set. • A write to a pipe (FIFO file) of PIPE_BUF bytes or less is requested, O_NONBLOCK is set, and not enough free space is available.
spt_writevx(2) OSS System Calls Reference Manual [EIO] One of these conditions occurred: • The process is a member of a background process group attempting to write to its controlling terminal, the TOSTOP flag is set, the process is neither ignoring nor blocking the SIGTTOU signal, and the process group of the process is orphaned. • A physical I/O error occurred. The device holding the file might be in the down state, or both processors that provide access to the device might have failed.
System Functions (s and S) spt_writevx(2) • The processor for the disk process of the specified file failed during an input or output operation, and takeover by the backup process occurred. • The open file descriptor has migrated to a new processor but the new processor lacks a resource or system process needed for use of the file descriptor. The file descriptor specified by the filedes parameter can only be closed.
SPT_WRITEX(2) OSS System Calls Reference Manual NAME SPT_WRITEX - writes data from an array in the application program to an open Guardian file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_WRITEX(2) Nowait I/O and SPT_WRITEX( ) calls If a nowait SPT_WRITE ( ) call is executed, count_written has no meaning and can be omitted. The count of the number of bytes written is obtained when the I/O operation completes through the count-transferred parameter of the Guardian AWAITIOX procedure. The SPT_WRITEX( ) function must complete with a corresponding call to the Guardian AWAITIOX procedure when used with a file that is opened nowait.
SPT_WRITEX(2) OSS System Calls Reference Manual Inserting a new record into a file The SPT_WRITEX( ) function inserts a new record into a file in the position designated by the file’s primary key: Key-sequenced files The record is inserted in the position indicated by the value in its primary-key field. Queue files The record is inserted into a file at a unique location.
System Functions (s and S) SPT_WRITEX(2) Structured files Inserting records into relative or entry-sequenced files If the insertion is to a relative or entrysequenced file, the file must be positioned currently through its primary key. Otherwise, the SPT_WRITEX( ) call fails, and a subsequent call to the Guardian FILE_GETINFO_ or FILEINFO procedure shows that Guardian filesystem error 46 (invalid key) occurred.
SPT_WRITEX(2) OSS System Calls Reference Manual DP2 performance with unstructured files is best when requested transfers begin on BUFFERSIZE boundaries and are integral multiples of BUFFERSIZE. If the SPT_WRITEX( ) call is to an unstructured disk file, data is transferred to the record location specified by the next-record pointer. The next-record pointer is updated to point to the record following the record written.
System Functions (s and S) SPT_WRITEX(2) • You must not modify the buffer before the I/O completes with a call to the Guardian AWAITIOX procedure. This restriction also applies to other processes that might be sharing the segment. It is the application’s responsibility to ensure this. • If the I/O has been initiated with SPT_WRITE( ), the I/O must be completed with a call to the Guardian AWAITIOX procedure.
SPT_WRITEX(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference 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.
System Functions (s and S) spt_writex(2) NAME spt_writex - Writes to a file (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
spt_writex(2) OSS System Calls Reference Manual If the O_SYNC flag of the file status is set and filedes refers to a regular file, a successful spt_writex( ) call does not return until the data is delivered to the underlying hardware (as described in the open(2) reference page). The O_NONBLOCK flag is effective only on pipes, FIFOs, sockets, and terminal device files (Telserv and OSSTTY processes).
System Functions (s and S) spt_writex(2) • If the O_NONBLOCK flag is set, the spt_writex( ) function returns the value -1 and errno is set to [EAGAIN]. When attempting to write to a socket and with no space available for data: • If the O_NONBLOCK flag is not set, the spt_writex( ) function blocks until space becomes available. • If the O_NONBLOCK flag is set, the spt_writex( ) function returns the value -1 and sets errno to [EAGAIN]. The O_NONBLOCK flag has no effect if there is space available.
spt_writex(2) OSS System Calls Reference Manual nbytes of free space are available. • [EBADF] The O_NONBLOCK flag is set on this file, and the process would be delayed in the write operation. The filedes parameter does not specify a valid file descriptor open for writing. [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available.
System Functions (s and S) spt_writex(2) [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOSPC] No free space is left on the fileset containing the file. [ENOTCONN] An attempt was made to write to a socket that is not connected to a peer socket.
spt_writex(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: creat(2), fcntl(2), lseek(2), open(2), pipe(2), socket(2), spt_fcntlx(2), spt_write(2), ulimit(3), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.
System Functions (s and S) stat(2) NAME stat - Provides information about a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int stat( const char *path, struct stat *buffer); PARAMETERS path Points to the pathname identifying the file.
stat(2) OSS System Calls Reference Manual OSS filesets. The fields in the stat structure have these meanings and content: st_dev OSS device identifier for a fileset. Values for local OSS objects are listed next. Values for local Guardian objects are described in Use on Guardian Objects, and values for remote Guardian or OSS objects are described in Use on Remote Objects, later in this reference page.
System Functions (s and S) stat(2) S_IFDIR Directory. S_IFIFO FIFO. S_IFREG Regular file. S_IFSOCK Socket. For an AF_UNIX socket, the user permissions from the inode for the socket are returned for the permission bits. The access flags are also returned from the inode.
stat(2) OSS System Calls Reference Manual st_uid For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Number of links to the file Number of links to the directory Number of links to the file Number of links to the socket file Number of links to the file Number of links to the file User ID. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (s and S) st_size stat(2) For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Undefined Undefined Undefined 0 (zero) Undefined ID of the device File size. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page. st_atime For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time.
stat(2) OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Time of the last data modification Time of the last modification Time of the last data modification Value retrieved from the inode Current time Composite value of the times of all openers of the file For the /E entry of the local node, the value is the time of the most recent mounting of the root fileset. st_ctime Status change time. Values for OSS objects are listed next.
System Functions (s and S) stat(2) updated by OSS function calls, not by Guardian procedure calls. The time fields for /G, /G/vol, and /G/vol/subvol always contain the current time. When the path parameter points to the name of a Guardian process that is not a process of subtype 30, the stat( ) function call fails. The value -1 is returned, and errno is set to [ENOENT].
stat(2) OSS System Calls Reference Manual Use on Remote Objects The content of the st_dev field of the stat structure is unique for each node in /E because each of these is a separate fileset. Values for directories within /E are the same as described for objects on the local HP NonStop node. The S_ISEXPANDOBJECT macro can indicate whether an object in the /E directory is on a remote HP NonStop node when the st_dev field is passed to the macro.
System Functions (s and S) stat(2) • The intermediate result of pathname resolution when a symbolic link is part of the path parameter The pathconf( ) function can be called to obtain the applicable limits. [ENOENT] [ENOROOT] One of these conditions exists: • The file specified by the path parameter does not exist. • The path parameter points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename.
stat(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: chmod(2), chown(2), link(2), lstat(2), mknod(2), open(2), pipe(2), utime(2). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • For files other than regular disk files or symbolic links, the st_size field of the stat structure is set to 0 (zero). For directories, st_size is set to 4096.
System Functions (s and S) statvfs(2) NAME statvfs - Gets fileset information using a pathname LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int statvfs( const char *path, struct statvfs *buffer); PARAMETERS path Is a pathname that specifies any file within a mounted fileset. buffer Points to a statvfs structure that is to hold the returned information for the statvfs( ) call.
statvfs(2) OSS System Calls Reference Manual f_frsize f_blocks For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E 4096 4096 4096 4096 4096 4096 4096 4096 4096 Fundamental file system block size. For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E 4096 4096 4096 4096 4096 4096 4096 4096 4096 Total number of blocks in fileset, in units of f_frsize.
System Functions (s and S) f_bfree statvfs(2) Total number of free blocks in fileset. For Contains Regular file Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks on all volumes currently in the storage-pool file for the fileset. Number of free blocks on all volumes currently in the storage-pool file for the fileset.
statvfs(2) OSS System Calls Reference Manual /G/ztnt/#ptynn /E f_files f_ffree Total number of file serial numbers (inode numbers) in the fileset. For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E Number of inode numbers in the fileset. Number of inode numbers in the fileset. Number of inode numbers in the fileset. Number of inode numbers in the fileset. Number of inode numbers in the fileset. The value of ULONG_MAX.
System Functions (s and S) statvfs(2) For Contains Regular file Number of free inode numbers in the fileset. Number of free inode numbers in the fileset. Number of free inode numbers in the fileset. Number of free inode numbers in the fileset. Number of free inode numbers in the fileset. The value of ULONG_MAX. 0 0 0 Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E f_fsid Fileset identifier. For Contains Regular file Lower 32 bits of the st_dev field in the stat structure.
statvfs(2) OSS System Calls Reference Manual f_flag For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E OSS OSS OSS OSS OSS GUARDIAN GUARDIAN GUARDIAN EXPAND Bit mask indicating type of fileset access allowed. For Contains Regular file 4 if fileset is read/write, 5 if fileset is readonly. 4 if fileset is read/write, 5 if fileset is readonly. 4 if fileset is read/write, 5 if fileset is readonly. 4 if fileset is read/write, 5 if fileset is readonly.
System Functions (s and S) f_namemax f_fstr statvfs(2) Maximum number of character bytes in a filename within the fileset. For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E 248 248 248 248 248 8 7 7 7 Fileset pathname prefix string. For Contains Regular file /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file.
statvfs(2) OSS System Calls Reference Manual f_bmaxavail For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E Number of blocks. Number of blocks. Number of blocks. Number of blocks. Number of blocks. Number of blocks. 0 0 0 Number of blocks free on the disk volume with the most space remaining. For Contains Regular file Directory FIFO AF_UNIX socket /dev/null Object in /G /G /G/ztnt/#ptynn /E Number of blocks. Number of blocks. Number of blocks.
System Functions (s and S) statvfs(2) ERRORS If any of the following conditions occurs, the statvfs( ) function sets errno to the corresponding value: [EACCES] Search permission is denied for a component of the path prefix of the path parameter. [EFAULT] The buffer or path parameter points to a location outside of the allocated address space of the process. [EINTR] The function was interrupted by a signal before any data arrived.
strtok_r(2) OSS System Calls Reference Manual NAME strtok_r - Splits string into tokens (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include char *strtok_r ( char *s, const char *sep, char **lasts ); PARAMETERS s Contains a pointer to the string to be searched. sep Contains a pointer to the string of byte token delimiters.
System Functions (s and S) strtok_r(2) The use of the header file spthread.h is an HP exception to the POSIX standard.
symlink(2) OSS System Calls Reference Manual NAME symlink - Creates a symbolic link to a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include int symlink( const char *path1, const char *path2); PARAMETERS path1 Specifies the file for which the symbolic link must be created.
System Functions (s and S) symlink(2) mknod( ) An error is returned if a symbolic link is named as the path parameter. open( ) An error is returned when O_CREAT and O_EXCL are both specified and the path parameter specifies an existing symbolic link. readlink( ) This function applies only to symbolic links. remove( ) A symbolic link can be removed by invoking the remove( ) function. rename( ) If the file to be renamed is a symbolic link, the symbolic link is renamed.
symlink(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the symlink( ) function returns the value 0 (zero). Otherwise, the value -1 is returned and errno is set to indicate the error. ERRORS If any of the following conditions occurs, the symlink( ) function sets errno to the corresponding value: [EACCES] One of the following conditions exists: • The requested operation requires writing in a directory with a mode that denies write permission.
System Functions (s and S) symlink(2) [ENOROOT] One of the following conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state. • The current root fileset for the specified file is unavailable. The OSS name server for the fileset might have failed. • The specified file is on a remote HP NonStop node and communication with the remote name server has been lost.
SPT_ABORTTRANSACTION(3) OSS System Calls Reference Manual NAME SPT_ABORTTRANSACTION - Aborts and backs out a transaction associated with the current process and current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include signed16 SPT_ABORTTRANSACTION( void ); PARAMETERS None. DESCRIPTION This function aborts and backs out a transaction associated with the current process and the current thread.
System Functions (s and S) SPT_BEGINTRANSACTION(3) NAME SPT_BEGINTRANSACTION - Starts a new transaction associated with the current process and current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
SPT_ENDTRANSACTION(3) OSS System Calls Reference Manual NAME SPT_ENDTRANSACTION - Ends the transaction associated with the current process and current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include signed16 SPT_ENDTRANSACTION( void ); PARAMETERS None.
System Functions (s and S) SPT_RESUMETRANSACTION(3) NAME SPT_RESUMETRANSACTION - Restores a transaction associated with the current process and current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include signed16 SPT_RESUMETRANSACTION( signed32 trans-begin-tag ); PARAMETERS Input trans_begin_tag This is the value returned for this transaction by the trans-begin-tag parameter of SPT_BEGINTRANSACTION( ).
SPT_SERVERCLASS_DIALOG_ABORT_(3) OSS System Calls Reference Manual NAME SPT_SERVERCLASS_DIALOG_ABORT_ - Aborts the specified dialog LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include signed16 SPT_SERVERCLASS_DIALOG_ABORT_( signed32 dialogId, ); PARAMETERS Input dialogId Contains the identifier returned from SPT_SERVERCLASS_DIALOG_BEGIN_( ) that specifies the dialog for this abort operation.
System Functions (s and S) SPT_SERVERCLASS_DIALOG_BEGIN_(3) NAME SPT_SERVERCLASS_DIALOG_BEGIN_ - Initiates the dialog and also sends the first message of the dialog to the server instance in the Pathway serverclass LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
SPT_SERVERCLASS_DIALOG_BEGIN_(3) OSS System Calls Reference Manual flags (Optional) If specified, this parameter must contain 0 (zero) for a single TMF transaction per dialog or 2 for multiple TMF transactions per dialog. This flag value (0 or 2) also indicates that this operation is always waited. This parameter is provided for compatibility with the Guardian SERVERCLASS_DIALOG_BEGIN_ procedure. tag (Optional) If specified, this parameter is ignored.
System Functions (s and S) SPT_SERVERCLASS_DIALOG_BEGIN_(3) NOTES The message_buffer parameter should refer to static or heap-allocated storage. It should not be automatic storage and should not be stack-allocated storage for a TNS process. If stack-allocated storage for a TNS process is specified, an error value 233 (FEScError) is returned; SPT_SERVERCLASS_SEND_INFO_( ) reports Pathsend error 912 (FEScParameterBoundsError). The message buffer is modified by the server reply.
SPT_SERVERCLASS_DIALOG_END_(3) OSS System Calls Reference Manual NAME SPT_SERVERCLASS_DIALOG_END_ - Cleans up resources for the specified dialog after the server has ended it LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) SPT_SERVERCLASS_DIALOG_SEND_(3) NAME SPT_SERVERCLASS_DIALOG_SEND_ - Initiates a send within the specified dialog to the server instance in the Pathway serverclass LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
SPT_SERVERCLASS_DIALOG_SEND_(3) OSS System Calls Reference Manual Output message_buffer On successful completion of the send, contains the reply returned by the server process. actual_reply_len (Optional) If provided, returns the number of bytes returned in the server process reply and stored in the area pointed to by message_buffer. scsend_op_num (Optional) If provided, returns the value -1. This parameter is provided only for compatibility with the Guardian SPT_SERVERCLASS_DIALOG_SEND_ procedure.
System Functions (s and S) SPT_SERVERCLASS_DIALOG_SEND_(3) RETURN VALUES Possible return values are the following Guardian file-system error numbers: 0 (zero) The SPT_SERVERCLASS_SEND_( ) operation completed successfully. 70 (FEContinue) The server is ready for the next message in the dialog. 233 (FEScError) You can call the SPT_SERVERCLASS_SEND_INFO_( ) function to get detailed information about this error. ERRORS This function does not set errno.
SPT_SERVERCLASS_SEND_(3) OSS System Calls Reference Manual NAME SPT_SERVERCLASS_SEND_ - Sends a message to and receives a reply from a server process in a Pathway server class LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) SPT_SERVERCLASS_SEND_(3) flags (Optional) If provided, must contain 0 (zero) to indicate a waited operation. This parameter is provided for compatibility with the Guardian SERVERCLASS_SEND_ procedure. tag (Optional) If provided, is ignored. This parameter is provided for compatibility with the Guardian SERVERCLASS_SEND_ procedure. Output message_buffer On successful completion of the send, contains the reply returned by the server process.
SPT_SERVERCLASS_SEND_(3) OSS System Calls Reference Manual If SPT_SERVERCLASS_SEND_( ) is called while the thread has a current transaction, the transaction identifier is propagated to the server class process. If the send is to a server class configured with the TMF parameter OFF, then the send finishes with return error 233 (FEScError) and SPT_SERVERCLASS_SEND_INFO_( ) will show Pathsend error 917 (FEScServerClassTmfViolation) and Guardian file-system error 0.
System Functions (s and S) SPT_SERVERCLASS_SEND_INFO_(3) NAME SPT_SERVERCLASS_SEND_INFO_ - Returns information about the last server-class send operation LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include signed16 SPT_SERVERCLASS_SEND_INFO_( [signed16 *Pathsend_error,] [signed16 *file_system_error] ); PARAMETERS Output Pathsend_error (Optional) Returns the Pathsend error number.
Section 8. System Functions (t) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with t. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
tdm_execve(2) OSS System Calls Reference Manual NAME tdm_execve - Executes a file with HP extensions LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include
System Functions (t) tdm_execve(2) macros and error codes, see the Guardian header file $SYSTEM.ZSPIDEF.ZGRDC or the summary of process-creation errors in the Guardian Procedure Calls Reference Manual (see the table entitled "Summary of Process Creation Errors"). DESCRIPTION The tdm_execve( ) function replaces the current process image with a new process image. The new image is constructed from a regular executable file, called a new process image file.
tdm_execve(2) OSS System Calls Reference Manual Executing a Binary File If the file specified as the new process image file is a binary executable file, the tdm_execve( ) function loads the file directly. Executing a Text File If the file specified as the new process image file is not a binary executable file, the tdm_execve( ) function examines the file to determine whether it is an executable text file.
System Functions (t) tdm_execve(2) Existing Sockets A socket associated with an open file descriptor in the calling process remains connected in the new process when the new process runs in the same processor as the calling process. When the new process runs in a different processor than the calling process, the processor that runs the new process must also be running a socket transport agent process.
tdm_execve(2) OSS System Calls Reference Manual OSS Attributes These OSS attributes of the calling process image are unchanged after successful completion of the tdm_execve( ) function: • OSS process ID (PID) • Parent OSS process ID • Process group ID • Session membership • Real user ID • Real group ID • Supplementary group IDs • The time left until an alarm clock signal is posted (see the alarm(3) reference page) • Current working directory • Root directory • File mode creation mask
System Functions (t) tdm_execve(2) • Security group list • Job ancestor or GMOM • Unread system message index (PCBMCNT) This attribute assignment is different from the assignment made when creating a new process with Guardian procedures. • Outstanding incoming and outgoing message limits This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
tdm_execve(2) OSS System Calls Reference Manual • The creator access ID (CAID) is set to the process access ID (PAID) of the calling process. • The PAID depends on whether the S_ISUID mode bit of the process image file is set. If that bit is set, the PAID is based on the file owner ID. If not, the PAID is the same as for the caller. (The S_ISUID mode bit of the image file has no effect on the security group list.) • The MOM field for the new process depends on whether the calling process is named.
System Functions (t) tdm_execve(2) In the current RVU, these fields are meaningful: typedef struct process_extension { long pe_len; char *pe_library_name; char *pe_swap_file_name; char *pe_extswap_file_name; short pe_priority; short pe_cpu; short pe_name_options; char filler_1[2]; char *pe_process_name; char *pe_hometerm; short pe_memory_pages; short pe_jobid; short pe_create_options; char filler_2[2]; char *pe_defines; short pe_defines_len; short pe_debug_options; long pe_pfs_size; short pe_OSS_options;
tdm_execve(2) OSS System Calls Reference Manual pe_extswap_file_name Points to a null-terminated string specifying the name of a disk file in the Guardian file system to be used as the swap file for the extended data segment. For example, if the Guardian filename is $A.B.D, the name used is /G/a/b/d. This file cannot have the same name as that of a file used in a preceding call to the tdm_fork( ) function. This field is used only for G-series TNS or accelerated new process image files.
System Functions (t) tdm_execve(2) _TPC_ENABLE_DEFINES Enables DEFINEs when set if _TPC_OVERRIDE_DEFMODE is also set. Disables DEFINEs when not set. _TPC_HIGHPIN_OFF Restricts the new process to a PIN in the range 0 through 254. This restriction is rarely useful for an OSS process; it allows obsolescent Guardian interfaces to interact with the process. By default, this restriction is inherited by any child or successor process. The default can be overridden by using the _TPC_IGNORE_FORCEPIN_ATTR field.
tdm_execve(2) OSS System Calls Reference Manual _TPC_DEBUG_SAVEABEND Uses the default debugger and creates a saveabend file. _TPC_ENTER_DEBUG Starts the new process in the default debugging utility. _TPC_INSPECT_NOSAVE Uses the symbolic debugger but does not create a saveabend file. _TPC_INSPECT_SAVEABEND Uses the symbolic debugger and creates a saveabend file. pe_pfs_size Specifies the size of the PFS for the new process (this field is ignored). pe_OSS_options Specifies OSS options.
System Functions (t) tdm_execve(2) new process is null. The MOM and ANCESTOR fields for the new process are the same as for a process created in the Guardian environment if the new process is unnamed (the pe_name_options field is set to _TPC_NO_NAME). If the caller is unnamed, the MOM field for the new process is set to the MOM field of the caller. If the caller is named, the MOM field for the new process is set to the ANCESTOR field of the calling process.
tdm_execve(2) OSS System Calls Reference Manual • The new process image file, any library file, or script file denies execution permission. • The new process image file is not a regular file. [EAGAIN] System resources such as disk space, process control block (PCB) space, MAPPOOL space, stack space, or PFS space are temporarily inadequate. [EFAULT] An address for a parameter in the process_extension structure pointed to by pe_parms is out of allowable bounds.
System Functions (t) [ENOENT] tdm_execve(2) One of these conditions exists: • One or more components of the new process image file’s pathname do not exist. • The path parameter points to an empty string. [ENOEXEC] The new process image file has the appropriate access permissions and is in the OSS name space, but it is neither in the correct binary executable format nor a valid executable text file. [ENOMEM] Required resources are not available.
tdm_execvep(2) OSS System Calls Reference Manual NAME tdm_execvep - Executes a file with HP extensions LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include
System Functions (t) tdm_execvep(2) error codes are defined for process creation functions. The list of _TPC_ macros described in that reference page is not complete; for a current description of error macros and error codes, see the Guardian header file $SYSTEM.ZSPIDEF.ZGRDC or the summary of process-creation errors in the Guardian Procedure Calls Reference Manual (see the table entitled "Summary of Process Creation Errors").
tdm_execvep(2) OSS System Calls Reference Manual Specifying the Environment The envp[ ] parameter is an array of character pointers to null-terminated strings. These strings constitute the environment for the new process image. The environment array is terminated with a null pointer. The number of bytes available for the new process’s combined argument and environment lists has a system-imposed limit.
System Functions (t) tdm_execvep(2) Open Files File descriptors open in the calling process image remain open in the new process image, except for those: • Whose close-on-exec flag FD_CLOEXEC is set (see the fcntl(2) reference page) • Opened using a Guardian function or procedure call For a G-series TNS process image or an accelerated processs image only, if the process file segment (PFS) of the new process image is smaller than the process file segment of the calling process image and if the calling
tdm_execvep(2) OSS System Calls Reference Manual • Be ignored (SIG_IGN) by the calling process image are set to be ignored by the new process image. • Cause abnormal termination (SIG_ABORT) in the calling process image are set to that action in the new process image. • Cause entry into the debugger (SIG_DEBUG) in the calling process image are set to that action in the new process image. • Be caught by the calling process image are set to the default action in the new process image.
System Functions (t) • tdm_execvep(2) File size limit (see the ulimit(2) reference page) Upon successful completion, the tdm_execvep( ) function marks the st_atime field of the file for update. The POSIX.1 standard does not specify the effect on the st_atime field when the tdm_execvep( ) function call fails but does find the file. Neither does the HP implementation guarantee the outcome. Under these circumstances, this field should not be used for further processing.
tdm_execvep(2) OSS System Calls Reference Manual • The process name for the new process is system-generated if the RUNNAMED option is set in the program file. Otherwise the process is unnamed. • The size of the data segment of the new process is set in the program file. • The remote login flag (PCBREMID) is set to zero (off) if the program file has its S_ISUID mode bit set. Otherwise, the remote login flag is set the same as for the caller.
System Functions (t) tdm_execvep(2) The input structure is defined in the tdmext.h header file. This structure can contain fields that vary from release version update (RVU) to RVU, including reserved and filler fields.
tdm_execvep(2) OSS System Calls Reference Manual pe_extswap_file_name Points to a null-terminated string specifying the name of a disk file in the Guardian file system to be used as the swap file for the extended data segment. For example, if the Guardian file name is $A.B.D, the name used is /G/a/b/d. This file cannot have the same name as that of a file used in a preceding call to the tdm_fork( ) function. This field is used only for G-series TNS or accelerated new process image files.
System Functions (t) tdm_execvep(2) _TPC_OVERRIDE_DEFMODE is also set. Disables DEFINEs when not set. _TPC_HIGHPIN_OFF Restricts the new process to a PIN in the range 0 through 254. This restriction is rarely useful for an OSS process; it allows obsolescent Guardian interfaces to interact with the process. By default, this restriction is inherited by any child or successor process. The default can be overridden by using the _TPC_IGNORE_FORCEPIN_ATTR field.
tdm_execvep(2) OSS System Calls Reference Manual _TPC_DEBUG_SAVEABEND Uses the default debugger and creates a saveabend file. _TPC_ENTER_DEBUG Starts the new process in the default debugger. _TPC_INSPECT_NOSAVE Uses the symbolic debugger but does not create a saveabend file. _TPC_INSPECT_SAVEABEND Uses the symbolic debugger and creates a saveabend file. pe_pfs_size Specifies the size of the process file segment (PFS) for the new process (this field is ignored). pe_OSS_options Specifies OSS options.
System Functions (t) tdm_execvep(2) the new process is set to the ANCESTOR field of the calling process, and the MOM field of the new process is null. The MOM and ANCESTOR fields for the new process are the same as for a process created in the Guardian environment if the new process is unnamed (the pe_name_options field is set to _TPC_NO_NAME). If the caller is unnamed, the MOM field for the new process is set to the MOM field of the caller.
tdm_execvep(2) OSS System Calls Reference Manual • The new process image file, any library file, or script file denies execution permission. • The new process image file is not a regular file. [EAGAIN] System resources such as disk space, process control block (PCB) space, MAPPOOL space, stack space, or PFS space are temporarily inadequate. [EFAULT] An address for a parameter in the process_extension structure pointed to by pe_parms is out of allowable bounds.
System Functions (t) [ENOENT] tdm_execvep(2) One of these conditions exists: • One or more components of the new process image file’s pathname do not exist. • The file parameter points to an empty string. [ENOEXEC] The command interpreter could not be invoked following failure to execute the process image file identified by the file parameter. [ENOMEM] Required resources are not available. Subsequent calls to the same function will not succeed for the same reason.
tdm_fork(2) OSS System Calls Reference Manual NAME tdm_fork - Creates a new process with HP extensions LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include pid_t tdm_fork( const struct process_extension *pe_parms, struct process_extension_results *pr_results); PARAMETERS pe_parms Points to the input structure containing Guardian process attributes to be assigned to the child process. The structure is defined in the tdmext.
System Functions (t) tdm_fork(2) Use From the Guardian Environment If called from a Guardian process, the actions of this function are undefined and errno is set to [ENOTOSS].
tdm_fork(2) OSS System Calls Reference Manual • The child process shares directory streams with the parent. They share the same block of directory entries. When reading an entry, the buffer pointer is advanced by one entry. From the perspective of either process, an entry might be skipped. If both processes call the readdir( ) function for a shared stream, the results are undefined. After such a call by both functions, another call to the readdir( ) function by either process has undefined results.
System Functions (t) tdm_fork(2) • Login, remote login, and saveabend flags • File creation mask • System debugger selection (based on Inspect mode and OSS read access rights on the program file) If the pe_parms parameter contains a null pointer, then the default Guardian attributes of the child process differ from those of the parent process in the following ways: • Segments created or shared using Guardian procedures such as SEGMENT_ALLOCATE_ are not inherited.
tdm_fork(2) OSS System Calls Reference Manual The following fields are meaningful: typedef struct process_extension { long pe_len; char *pe_library_name; char *pe_swap_file_name; char *pe_extswap_file_name; short pe_priority; short pe_cpu; short pe_name_options; char filler_1[2]; char *pe_process_name; char *pe_hometerm; short pe_memory_pages; short pe_jobid; short pe_create_options; char filler_2[2]; char *pe_defines; short pe_defines_len; short pe_debug_options; long pe_pfs_size; short pe_OSS_options; c
System Functions (t) tdm_fork(2) pe_priority Specifies the priority of the child process. pe_cpu Specifies the processor on which the child process will execute. The only valid values for the tdm_fork( ) function are -1 (the default value) and the current processor number. Each of these values has the effect of running the child process on the same processor as the parent. pe_name_options Specifies process naming as follows: _TPC_GENERATE_NAME The system generates the name.
tdm_fork(2) OSS System Calls Reference Manual _TPC_IGNORE_FORCEPIN_ATTR Ignores the _TPC_HIGHPIN_OFF restriction specified for or inherited by the parent process. When _TPC_IGNORE_FORCEPIN_ATTR is specified, the resulting process has a restricted PIN only if _TPC_HIGHPIN_OFF is also specified or if the object file for the program or a user library lacks the HIGHPIN attribute.
System Functions (t) tdm_fork(2) _TPC_INSPECT_SAVEABEND Uses the symbolic debugger and creates a saveabend file. pe_pfs_size Specifies the size of the process file segment (PFS) for the child process (this field is ignored). pe_OSS_options Specifies OSS options. No special action on signals is the default and only current OSS option. pe_mainstack_max Specifies the maximum size of the main stack in bytes for the child process.
tdm_fork(2) OSS System Calls Reference Manual Shared Memory Any attached shared memory segments are attached to both the child process and the parent process when both processes execute in the same processor. Any attached shared memory segments are detached from the child process by a successful call to the tdm_fork( ) function when the child process executes in a different processor than that used by the parent.
System Functions (t) tdm_fork(2) If the tdm_fork( ) function fails, the value -1 is returned to the parent process, no child process is created, and errno is set to indicate the error. If pr_results does not contain a null pointer, it returns additional error information including the PROCESS_LAUNCH_ procedure error and error detail.
tdm_spawn(2) OSS System Calls Reference Manual NAME tdm_spawn - Executes a new process with HP extensions LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include #include
System Functions (t) tdm_spawn(2) envp[ ] Specifies an array of character pointers to null-terminated strings that describe the environment for the new process. pe_parms Points to the input structure containing Guardian process attributes to be assigned to the new process. The structure is defined in the tdmext.h header file. When this parameter contains a null pointer, the tdm_spawn( ) function assumes default Guardian attributes.
tdm_spawn(2) OSS System Calls Reference Manual The arguments specified by a program using the tdm_spawn( ) function are passed on to the new process image in the corresponding arguments to the main( ) function. Use From the Guardian Environment If called from a Guardian process, the actions of this function are undefined, and errno is set to [ENOTOSS]. Identifying the Process Image File The tdm_spawn( ) function uses the path parameter to identify the process image file.
System Functions (t) tdm_spawn(2) When the File Is Invalid If the process image file is not a valid executable object, or if the text file does not contain the header line, the tdm_spawn( ) function returns and sets errno to [ENOEXEC]. Open Files The fd_count and fd_map[ ] parameters determine which file descriptors that were open in the calling process remain open in the new process. fd_count specifies the number of file descriptors to be designated by the fd_map[ ] parameter.
tdm_spawn(2) OSS System Calls Reference Manual Shared Memory Any attached shared memory segments are detached from the child process by a successful call to the tdm_spawn( ) function. See the shmat(2) reference page for additional information about shared memory segment use. Semaphores Semaphore set IDs attached to a parent process are also attached to the child process if the child process executes in the same processor as the parent.
System Functions (t) tdm_spawn(2) User ID and Group ID If the set-user-ID mode bit (S_ISUID) of the new process image file is set (see the chmod(2) reference page), the effective user ID of the new process image is set to the user ID of the owner of the new process image file. Similarly, if the set-group-ID mode bit (S_ISGID) of the new process image file is set, the effective group ID of the new process image is set to the group ID of the new process image file.
tdm_spawn(2) OSS System Calls Reference Manual • The set of signals for which default action is set and the set of signals to be ignored are the same in the child process as in the parent process unless modified by inherit->sigdefault. See Signals, earlier. • The child process does not share directory streams with the parent. All open directory streams are closed for the child process.
System Functions (t) tdm_spawn(2) • The process name for the new process is system-generated if the RUNNAMED option is set in the program file. Otherwise, the process is unnamed. • The size of the data segment of the new process is set in the program file. • The remote login flag (PCBREMID) is set to zero (off) if the program file has its S_ISUID mode bit set. Otherwise, the remote login flag is set the same as for the caller.
tdm_spawn(2) OSS System Calls Reference Manual In the current RVU, these fields are meaningful: typedef struct process_extension { long pe_len; char *pe_library_name; char *pe_swap_file_name; char *pe_extswap_file_name; short pe_priority; short pe_cpu; short pe_name_options; char filler_1[2]; char *pe_process_name; char *pe_hometerm; short pe_memory_pages; short pe_jobid; short pe_create_options; char filler_2[2]; char *pe_defines; short pe_defines_len; short pe_debug_options; long pe_pfs_size; short pe_O
System Functions (t) tdm_spawn(2) pe_extswap_file_name Points to a null-terminated string specifying the name of a disk file in the Guardian file system to be used as the swap file for the extended data segment. For example, if the Guardian filename is $A.B.D, the name used is /G/a/b/d. This field is used only for G-series TNS or accelerated new process image files. If a value is specified for this field for native object files, the specified value is validated but otherwise ignored.
tdm_spawn(2) OSS System Calls Reference Manual _TPC_HIGHPIN_OFF Restricts the new process to a PIN in the range 0 through 254. This restriction is rarely useful for an OSS process; it allows obsolescent Guardian interfaces to interact with the process. By default, this restriction is inherited by any child or successor process. The default can be overridden by using the _TPC_IGNORE_FORCEPIN_ATTR field.
System Functions (t) tdm_spawn(2) _TPC_DEBUG_SAVEABEND Uses the default debugger and creates a saveabend file. _TPC_ENTER_DEBUG Starts the new process in the default debugger. _TPC_INSPECT_NOSAVE Uses the symbolic debugger but does not create a saveabend file. _TPC_INSPECT_SAVEABEND Uses the symbolic debugger and creates a saveabend file. pe_pfs_size Specifies the size of the process file segment (PFS) for the new process (this field is ignored). pe_OSS_options Specifies OSS options.
tdm_spawn(2) OSS System Calls Reference Manual Output Structure Information If the pr_results parameter does not contain a null pointer, it points to an output structure defined in the tdmext.h header file. This structure can contain fields that vary from RVU to RVU, including reserved and filler fields. First, the output structure must be initialized by using the #define DEFAULT_PROCESS_EXTENSION_RESULTS. This initialization sets the value of the pr_len field to the correct value for the current RVU.
System Functions (t) tdm_spawn(2) • The pointers contained within the global variable environ • The elements pointed to by environ pointers • The effective user ID of the current process • The effective group ID of the current process [E2BIG] The number of bytes used by the new process image’s argument list and environment list is greater than the system-imposed limit. The limit can be obtained by calling the sysconf(_SC_ARG_MAX) function.
tdm_spawn(2) OSS System Calls Reference Manual [ELOOP] Too many symbolic links were encountered in pathname resolution. [EMFILE] The maximum number of files are open. The process attempted to open more than the maximum number of file descriptors allowed for the process. One of these conditions might exist: • The maximum value for fd_count has been exceeded. • The process file segment (PFS) of the child process is smaller than that of the parent process.
System Functions (t) tdm_spawn(2) [EUNKNOWN] Unknown error. An unrecognized or very obscure error occurred. If this error occurs, follow site-defined procedures for reporting software problems to HP. The structure pointed to by the pr_results parameter might contain additional Guardian PROCESS_LAUNCH_ procedure error and error detail information if any of these errors occur: [EACCES], [EAGAIN], [EFAULT], [EINVAL], [EIO], [ENOCPU], and [ENOEXEC]. RELATED INFORMATION Commands: eld(1), ld(1), nld(1).
tdm_spawnp(2) OSS System Calls Reference Manual NAME tdm_spawnp - Executes a new process with HP extensions LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl H-series OSS processes: /G/system/zdllnnn/zosskdll SYNOPSIS #include #include
System Functions (t) tdm_spawnp(2) inherit Points to a structure that allows the process group ID and signal mask of the new process to be specified in addition to a list of signals that the child process will take default action on. The structure is defined in the spawn.h header file. argv[ ] Specifies an array of character pointers to null-terminated strings containing arguments to be passed to the main function of the new program.
tdm_spawnp(2) OSS System Calls Reference Manual When a program is executed as a result of a tdm_spawnp( ) call, it is entered as a function call: int main( int argc, char ∗ argv[ ], char ∗ envp); Here, the argc parameter is the argument count, the argv[ ] parameter is an array of character pointers to the arguments themselves, and the envp parameter is a pointer to a character array listing the environment variables. The argv[ ] array is terminated by a null pointer.
System Functions (t) tdm_spawnp(2) • argv[0] is set to the name of the command interpreter. • If the optional_string portion is present, argv[1] is set to optional_string. • The next element of argv[ ] is set to the original value of file. • The remaining elements of argv[ ] are set to the original elements of argv[ ], starting with argv[1]. The original argv[0] is discarded. The S_ISUID and S_ISGID mode bits of an executable text file are ignored.
tdm_spawnp(2) OSS System Calls Reference Manual Existing Sockets A socket associated with an open file descriptor in the calling process remains connected in the new process when the new process runs in the same processor as the calling process. When the new process runs in a different processor than the calling process, the processor that runs the new process must also be running a socket transport agent process.
System Functions (t) • tdm_spawnp(2) Signals pending in the parent process are disregarded by the child process. The inheritance structure can modify the default signal information as follows: • If the SPAWN_SETSIGMASK bit is set in inherit->flags, inherit->sigmask contains the signal mask for the child process. • If the SPAWN_SETSIGDEF bit is set in inherit->flags, inherit->sigdefault specifies the signal set that is forced to the default action in the child process.
tdm_spawnp(2) OSS System Calls Reference Manual • The child process has its own copy of a subset of the parent process’s file descriptors. See Open Files, earlier in this reference page. However, each of the child’s file descriptors shares a common file pointer with the corresponding file descriptor of the parent process. • The child process does not inherit file opens created by Guardian function or procedure calls. • The child process does not inherit file locks.
System Functions (t) • tdm_spawnp(2) Outstanding incoming and outgoing message limits This attribute assignment is different from the assignment made when creating a new process with Guardian procedures.
tdm_spawnp(2) OSS System Calls Reference Manual • For unnamed processes, the MOM field of the child process is NULL. For named processes, the ancestor field identifies the parent. • System debugger selection for the new process is based on the INSPECT mode flag in the program file. • Code breakpoints and memory breakpoints are not inherited. For detailed information about Guardian process attributes, see the PROCESS_LAUNCH_ procedure in the Guardian Procedure Calls Reference Manual.
System Functions (t) tdm_spawnp(2) The input structure passes this information: pe_len Specifies the size of the structure in bytes. This value is set by the #define DEFAULT_PROCESS_EXTENSION and should not be changed. pe_library_name Points to the name of the user library to be bound to the new process. The string that is pointed to is null-terminated and in OSS name format. If the pointer points to a zero-length string (a NULL character), the new process is run with no user library file.
tdm_spawnp(2) OSS System Calls Reference Manual pe_process_name Points to the null-terminated Guardian process name if _TPC_NAME_SUPPLIED is specified in the pe_name_options field. For example, if the Guardian process name is $DELM, the name used is /G/delm. pe_hometerm Points to the null-terminated name in the Guardian file system for the home terminal. For example, if the Guardian name is $ztnt.#xyz, the name used is /G/ztnt/#xyz. pe_memory_pages Specifies the size of the data stack in 2K-byte units.
System Functions (t) tdm_spawnp(2) _TPC_SUPPLIED_DEFINES_ONLY Propagates only the DEFINEs indicated by the pe_defines field. pe_defines Points to a specified saved set of DEFINEs created by using the Guardian DEFINESAVE procedure. These DEFINEs are propagated to the new process if either _TPC_SUPPLIED_DEFINES_ONLY or _TPC_BOTH_DEFINES is specified in the pe_create_options field. Note: This string is not null-terminated. pe_defines_len Specifies the length of the string in the pe_defines field.
tdm_spawnp(2) OSS System Calls Reference Manual pe_heap_max Specifies the maximum size of the heap in bytes for the new process if it is a native process. See the C/C++ Programmer’s Guide description of the HEAP pragma for guidance on the use of nonzero values for this field. If a value is specified for this field for G-series TNS or accelerated object files, the specified value is ignored. pe_space_guarantee Specifies the minimum available swap space to guarantee for the new process.
System Functions (t) tdm_spawnp(2) This example creates a new process under a different user ID: save = getuid(); setuid(newid); tdm_spawnp(...); setuid(save); RETURN VALUES Upon successful completion, the tdm_spawnp( ) function returns the OSS process ID of the child process to the parent process. If the pr_results parameter does not contain a null pointer, it returns the Guardian process handle of the new process in addition to the OSS process ID.
tdm_spawnp(2) OSS System Calls Reference Manual [EAGAIN] System resources such as disk space, process control block (PCB) space, MAPPOOL space, stack space, or PFS space are temporarily inadequate. [EBADF] A file descriptor pointed to by the fd_map[ ] parameter is invalid. [EFAULT] An address for a parameter in the process_extension structure pointed to by pe_parms is out of allowable bounds.
System Functions (t) [ENOENT] tdm_spawnp(2) One of these conditions exists: • One or more components of the new process image file’s pathname do not exist. • The file parameter points to an empty string. [ENOEXEC] The command interpreter could not be invoked following failure to execute the process image file identified by the file parameter. [ENOMEM] Required resources are not available. Subsequent calls to the same function will not succeed for the same reason.
tmpnam_r(2) OSS System Calls Reference Manual NAME tmpnam_r - Constructs the name for a temporary file (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char *tmpnam_r ( char *buf ); PARAMETERS buf Specifies the address of an array of at least the number of bytes specified by L_tmpnam, a constant defined in the stdio.h header file.
System Functions (t) ttyname_r(2) NAME ttyname_r - Gets the name of a terminal (reentrant) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int ttyname_r ( int filedes, char *name, size_t namesize ); PARAMETERS filedes Specifies an open file descriptor. name Points to the buffer to receive the pathname. namesize Specifies the length of name passed in bytes.
ttyname_r(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: ttyname(3). Miscellaneous: filename(5). STANDARDS CONFORMANCE This function is an extension to the UNIX98 specification. Interfaces documented on this reference 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.
Section 9. System Functions (u) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with u. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
ulimit(2) OSS System Calls Reference Manual NAME ulimit - Sets and gets file size limits LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include long int ulimit( int cmd [ , ... /* long int blk_size */ ] ); In this instance, the ellipsis ( . . . ) indicates that the function is variable. An additional, optional parameter can be specified. PARAMETERS cmd Specifies the operation to be performed.
System Functions (u) [EPERM] ulimit(2) • The value specified for the cmd parameter is not valid. • The value specified for the second parameter is too large. The process does not have the appropriate privileges to perform the requested operation. RELATED INFORMATION Functions: creat(2), open(2), write(2). STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: • 527186-005 The error [EINVAL] is returned when the second parameter is too large.
umask(2) OSS System Calls Reference Manual NAME umask - Sets and gets the value of the file mode creation mask LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ mode_t umask( mode_t cmask); PARAMETERS cmask Specifies the value of the file mode creation mask.
System Functions (u) uname(2) NAME uname - Gets information identifying the current system LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int uname( struct utsname *name); PARAMETERS name Points to the utsname structure, where information about the current system is stored. DESCRIPTION The uname( ) function stores information identifying the current system in the structure pointed to by the name parameter.
uname(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, a nonnegative value is returned. If the function call is unsuccessful, one of the following might happen: • The value -1 is returned and errno is set to indicate the error. • A Guardian trap is set. ERRORS If the following condition occurs, the uname( ) function sets errno to the corresponding value: [EFAULT] The name parameter points outside of the process address space. RELATED INFORMATION Commands: uname(1).
System Functions (u) unlink(2) NAME unlink - Removes a directory entry from the OSS environment LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int unlink( const char *path); PARAMETERS path Specifies the directory entry to be removed. DESCRIPTION The unlink( ) function removes the directory entry specified by the path parameter and decrements the link count of the file referenced by the link.
unlink(2) OSS System Calls Reference Manual ERRORS If any of the following conditions occurs, the function sets errno to the corresponding value and the named file is not unlinked: [EACCES] One of the following conditions is true: • Search permission is denied for a component of the pathname prefix, or write permission is denied on the directory containing the link to be removed. • The S_ISVTX flag is set on the directory containing the existing file referred to by the path parameter.
System Functions (u) [ENOENT] [ENOROOT] unlink(2) One of the following conditions exists: • The named file does not exist. • The path parameter points to an empty string. • The path parameter specifies a file on a remote HP NonStop node but communication with the remote node has been lost. One of the following conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state. • The current root fileset for the specified file is unavailable.
unlink(2) OSS System Calls Reference Manual The following are HP extensions to the XPG4 Version 2 specification: • 9−10 The errno values [EFAULT], [EFSBAD], [EGUARDIANOPEN], [EINVAL], [ENOROOT], [ENXIO], and [EOSSNOTRUNNING] can be returned.
System Functions (u) utime(2) NAME utime - Sets file access and modification times LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int utime( const char *path, struct utimbuf *times); PARAMETERS path Points to the pathname for the file. If the final component of the path parameter names a symbolic link, the link is traversed and pathname resolution continues.
utime(2) OSS System Calls Reference Manual Use From the Guardian Environment The file access time is not updated by I/O operations that are performed on a file that was opened in the Guardian environment (that is, by the FILE_OPEN_ or OPEN Guardian procedures).
System Functions (u) [ENOENT] [ENOROOT] utime(2) One of the following conditions exists: • The named file does not exist. • The path parameter points to an empty string. • The path parameter specifies a file on a remote HP NonStop node but communication with the remote node has been lost. One of the following conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state. • The current root fileset for the specified file is unavailable.
Section 10. System Functions (w) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with w. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
wait(2) OSS System Calls Reference Manual NAME wait - Waits for any child process to terminate LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t wait( int ∗ status_location); PARAMETERS status_location Points to a location that receives the child process termination status, as defined in the sys/wait.h header file.
System Functions (w) wait(2) Status Information If the wait( ) function returns because the status of a child process is available, it returns the OSS process ID of the child process. In this case, if the status_location parameter is not a null pointer, information is stored in the location pointed to by status_location.
wait(2) OSS System Calls Reference Manual WSTOPSIG(∗∗status_location) If the value of WIFSTOPPED(∗∗status_location) is nonzero, evaluates to the number of the signal that caused the child process to stop. This macro is normally only useful with the waitpid( ) function. WTERMSIG(∗∗status_location) If the value of WIFSIGNALED(∗∗status_location) is nonzero, evaluates to the number of the signal that caused the termination of the child process.
System Functions (w) wait(2) Abnormal Termination Abnormal termination can occur for several reasons, including the following: • The child process calls the Guardian ABEND procedure, or it calls the Guardian PROCESS_STOP_ procedure with the parameters set for abnormal termination. • The processor in which the process was running fails. • Some critical system resource is exhausted.
wait(2) OSS System Calls Reference Manual RETURN VALUES If the wait( ) function returns because the status of a child process is available, the OSS process ID of the child is returned to the calling process. If a signal is received via pthread_kill(2) that is not blocked,ignored, or handled, -1 is returned with an errno of EINTR. Upon any error, the value -1 is returned and errno is set to indicate the error.
System Functions (w) waitpid(2) NAME waitpid - Waits for a specific child process to stop or terminate LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ pid_t waitpid( pid_t process_id, int ∗ status_location, int options); PARAMETERS process_id Specifies the child process.
waitpid(2) OSS System Calls Reference Manual modified by the values of the process_id and options parameters. Use From the Guardian Environment If called from a Guardian process, the actions of this function are undefined and errno is set to [ENOTOSS]. Specifying the Child Process The waitpid( ) function allows the calling process to gather status from a specific set of child processes. The waitpid( ) function returns the status of a child process from this set.
System Functions (w) waitpid(2) • The lower 8 bits of the completion code for a process that terminated itself by calling the Guardian STOP or PROCESS_STOP_ procedure • The lower 8 bits of the value that the child process returned from the main( ) function WIFABENDED(∗∗status_location) Evaluates to a nonzero value if the child process terminated abnormally. A SIGABEND signal was received.
waitpid(2) OSS System Calls Reference Manual • Calling the _exit( ) or exit( ) function. The exit status is placed in ∗ status_location. • Calling the Guardian STOP or PROCESS_STOP_ procedure with parameters set for self-termination. The completion code is placed in ∗ status_location. The parent process can use the WIFEXITED macro to detect a child process that terminates itself; WIFEXITED evaluates to a nonzero value.
System Functions (w) waitpid(2) Process Stopped If the WUNTRACED option is set in the waitpid( ) call, the call returns when the child process is temporarily suspended because it received a SIGTTIN, SIGTTOU, SIGSTOP, or SIGTSTOP signal. The WIFSTOPPED macro evaluates to a nonzero value. The WSTOPSIG macro evaluates to the number of the signal that caused the process to stop.
waitpid(2) OSS System Calls Reference Manual [EINTR] The function was terminated by receipt of a signal. The information pointed to by the status_location parameter is not meaningful when this error occurs and should not be used in further processing. [EINVAL] The value of the options parameter is invalid. [ENOTOSS] The calling process was not an OSS process. The waitpid( ) function cannot be used in the Guardian environment.
System Functions (w) write(2) NAME write - Writes to a file LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ ssize_t write( int filedes, void *buffer, size_t nbytes); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the accept( ), creat( ), dup( ), dup2( ), fcntl( ), open( ), pipe( ), socket( ), or socketpair( ) function.
write(2) OSS System Calls Reference Manual • If the size of the write( ) request is less than or equal to the value of the PIPE_BUF system variable, the write( ) function is guaranteed to be atomic. The data is not interleaved with data from other processes doing writes on the same pipe. • If the size of the write( ) request is greater than the value of the PIPE_BUF system variable, the file system attempts to resize the pipe buffer from 2 * PIPE_BUF to 65,536 bytes.
System Functions (w) write(2) Use on Guardian Objects Attempting to write to a Guardian file (that is, a file in /G) that is locked causes the write( ) function to return -1 and set errno to [EGUARDIANLOCKED]. RETURN VALUES Upon successful completion, the write( ) function returns the number of bytes that were actually written. Otherwise, the value -1 is returned, and errno is set to indicate the error.
write(2) OSS System Calls Reference Manual • A physical I/O error occurred. Data might have been lost during a transfer. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOSPC] No free space is left on the fileset containing the file.
System Functions (w) write(2) RELATED INFORMATION Functions: creat(2), fcntl(2), lseek(2), open(2), pipe(2), socket(2), ulimit(3). STANDARDS CONFORMANCE The HP implementation does not generate the SIGXFSZ signal. The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • Calls to the write( ) function with the nbytes parameter equal to 0 are supported for all regular and nonregular files.
writev(2) OSS System Calls Reference Manual NAME writev - Writes to a file from scattered buffers LIBRARY G-series native OSS processes: /G/system/sysnn/zossesrl H-series OSS processes: /G/system/zdllnnn/zossedll SYNOPSIS #include #include
System Functions (w) writev(2) Upon successful completion, the writev( ) function returns the number of bytes actually written to the file associated with filedes. If the O_APPEND status flag of the file is set, the file offset is set to the end of the file prior to each write. Write requests to a pipe or FIFO file are handled the same as writes to a regular file with these exceptions: • No file offset is associated with a pipe; therfore, each writev( ) request appends to the end of the pipe.
writev(2) OSS System Calls Reference Manual When attempting to write to a socket with no space available for data: • If the O_NONBLOCK flag is not set, the writev( ) function blocks until space becomes available or an error occurs. • If the O_NONBLOCK flag is set, the writev( ) function returns the value -1 and sets errno to [EWOULDBLOCK].
System Functions (w) writev(2) [EGUARDIANLOCKED] A writev( ) operation was attempted to a file in the Guardian file system (that is, a file in /G) that is locked. [EINTR] A writev( ) operation was interrupted by a signal before any data was written. [EINVAL] One of these conditions occurred: [EIO] • The file position pointer associated with the file specified by the filedes parameter was negative. • The value of the iov_count parameter was less than or equal to 0 (zero), or greater than IOV_MAX.
writev(2) OSS System Calls Reference Manual • An attempt was made to write to a socket that is shut down or closed. [ETIMEDOUT] Data transmission on the socket timed out. [EWOULDBLOCK] The process attempted an operation on a socket for which O_NONBLOCK is set, there is no space available, and no error has occurred.
Section 11. Files This section contains reference pages for some Open System Services (OSS) header files and special files. These reference pages reside in the cat4 and cat7 directories and are sorted alphabetically by U.S. English conventions in this section.
ar(4) OSS System Calls Reference Manual NAME ar - Describes the archive (library) file format SYNOPSIS #include DESCRIPTION The ar archive command combines several files into one. Archives are used mainly as libraries to be searched by the Binder utility for TNS or accelerated programs and by the nld utility for TSN/R native programs. A file produced by the ar command has a magic number at the start, followed by the constituent files, each preceded by a file header.
Files core(4) NAME core, saveabend - Is a file containing a memory image DESCRIPTION In the OSS implementation, the equivalent of a core file is a saveabend file. A saveabend file is a type of process snapshot file and can be used with a system debugger when necessary. A saveabend file is created whenever a process terminates abnormally and it is possible to create a saveabend file. The location of a saveabend file is displayed on the home terminal of the terminated process.
cpio(4) OSS System Calls Reference Manual NAME cpio - Describes the extended cpio archive file format SYNOPSIS #include DESCRIPTION The byte-oriented cpio archive file format is a series of entries, each entry made up of a header that describes the file and the name of the file, followed by the contents of the file. The format of the cpio header is described below. Table 11−1.
Files cpio(4) The archive entry for the name of a file has the following format: Table 11−2. cpio Archive File Filename Entry Format Field Name Length (in octets) Interpretation ____________________________________________ c_name c_namesize Pathname string The c_name field contains the pathname of the file as a string with the length given by the c_namesize field in the file header. This string length includes the null character that terminates the name.
cpio(4) OSS System Calls Reference Manual The cpio.h header file contains the following macro definitions: Table 11−4. cpio.
Files dir(4) NAME dir - Describes the format of directories SYNOPSIS #include #include DESCRIPTION A directory is a file that contains directory entries. The fact that a file is a directory is indicated by a bit in the flag word of the inode entry for the file. Users cannot write a directory. Users can read directory entries by making calls to the readdir( ) function after opening the directory file by calling the opendir( ) function.
float(4) OSS System Calls Reference Manual NAME float - Specifies the system limits for floating-point operations SYNOPSIS #include DESCRIPTION The float.h header file defines symbolic names. These symbolic names represent floating-point values for the two possible floating-point formats that a program can use. The floating-point format is chosen at compilation time. See the float.h header file for the actual values of these limits in the HP implementation.
Files float(4) Table 11−5. Values for Floating-Point Constants Symbolic Constant Tandem-Format Value IEEE-Format Value ______________________________________________________________________ DBL_DIG DBL_EPSILON 16 15 2.2204460492503131E-16 5.551115123125782720e17 DBL_MANT_DIG 55 53 DBL_MAX 1.15792089237316192e77 1.7976931348623157E+308 DBL_MAX_EXP 256 1024 DBL_MAX_10_EXP 77 308 DBL_MIN 1.7272337110188889e-77 2.2250738585072014E-308 DBL_MIN_EXP -254 -1021 DBL_MIN_10_EXP -77 -307 FLT_EPSILON 2.
limits(4) OSS System Calls Reference Manual NAME limits - Specifies the system limits SYNOPSIS #include DESCRIPTION The limits.h header file defines symbolic names. These symbolic names represent: • Implementation-dependent constants whose values set limits on system resources used by applications in the OSS environment. These values are all at least as large as minimum acceptable values set by the POSIX.1, POSIX.2, and XPG4 standards.
Files limits(4) CHAR_BIT Number of bits in an object of type char. This value is always 8. CHARCLASS_NAME_MAX Maximum number of bytes in a character class name. This value is always 255. CHAR_MAX Maximum value for a signed char. In the HP implementation, the type char is not considered a signed integer; CHAR_MAX is therefore treated like UCHAR_MAX. CHAR_MIN Minimum value for a signed char. In the HP implementation, the type char is not considered a signed integer; CHAR_MIN is therefore 0 (zero).
limits(4) OSS System Calls Reference Manual NL_ARGMAX Maximum value of the digit parameter in calls to the printf( ) and scanf( ) functions. NL_MSGMAX Maximum message number. NL_NMAX Maximum number of bytes in an N-to-1 collation mapping. NL_SETMAX Maximum number of filesets per catalog. NL_TEXTMAX Maximum number of bytes in a message string. PATH_MAX Maximum number of bytes in a pathname including the terminating null character.
Files limits(4) POSIX-Defined Minimum Values The symbolic constants in the following list are defined in the limits.h header file with values specified by the POSIX.1 and POSIX.2 standards or in the POSIX.12 draft standard. These symbolic names represent the most restrictive value for certain features. A portable application must not require a larger value for correct operation. The HP implementation defines some of the related symbolic constants to be less restrictive.
limits(4) OSS System Calls Reference Manual _POSIX_STREAM_MAX Maximum number of streams that one process can have open at one time. _POSIX_TZNAME_MAX Maximum number of bytes supported for the name of a time zone (not of the TZ variable). _POSIX2_BC_BASE_MAX Maximum obase values allowed by the bc utility. _POSIX2_BC_DIM_MAX Maximum number of elements permitted in an array by the bc utility. _POSIX2_BC_SCALE_MAX Maximum scale value allowed by the bc utility.
Files limits(4) MAX_CANON Maximum number of bytes in a terminal canonical input line. Use the pathconf( ) function to obtain this value at run time. MAX_INPUT Minimum number of bytes for which space is available in a terminal input queue; therefore, the maximum number of bytes a portable application can require to be entered as input before it reads them. Use the pathconf( ) function to obtain this value at run time. NAME_MAX Maximum number of bytes in a filename (excluding the terminating null).
limits(4) OSS System Calls Reference Manual Table 11−7.
Files math(4) NAME math - Specifies the mathematical constants SYNOPSIS #include DESCRIPTION The math.h header file defines symbolic names and constant values of type double. The symbolic names are: HUGE_VAL Specifies a positive double expression that cannot necessarily be represented as a type float value. Used as an error indicator when returned as a value for mathematics library functions. For Tandem-format floating-point data, the value of HUGE_VAL is DBL_MAX.
named.conf(4) OSS System Calls Reference Manual NAME named.conf - configuration file for BIND 9 domain name server named DESCRIPTION named.conf is the configuration file for the named server. Within the file, directive statements are enclosed in braces and terminated with a semi-colon. Clauses in the statements are also terminated with a semi-colon.
Files named.conf(4) controls controls { inet ( ipv4_address | ipv6_address | * ) [ port ( integer | * ) ] allow { address_match_element; ... } [ keys { string; ... } ]; unix unsupported; // not implemented }; logging logging { channel string { file log_file; syslog optional_facility; null; stderr; severity log_severity; print-time boolean; print-severity boolean; print-category boolean; }; category string { string; ...
named.
Files named.conf(4) ipv6_address [port integer] ); ... } edns-udp-size integer; root-delegation-only [ exclude { quoted_string; ... } ]; disable-algorithms string { string; ... }; dnssec-enable boolean; dnssec-lookaside string trust-anchor string; dnssec-must-be-secure string boolean; dialup dialuptype; ixfr-from-differences ixfrdiff; allow-query { address_match_element; ... }; allow-transfer { address_match_element; ... }; allow-update-forwarding { address_match_element; ...
named.conf(4) OSS System Calls Reference Manual allow-v6-synthesis { address_match_element; ...
Files named.conf(4) min-roots integer; // not implemented lame-ttl integer; max-ncache-ttl integer; max-cache-ttl integer; transfer-format ( many-answers | one-answer ); max-cache-size size_no_default; check-names ( master | slave | response ) ( fail | warn | ignore ); cache-file quoted_string; suppress-initial-notify boolean; // not yet implemented preferred-glue string; dual-stack-servers [ port integer ] { ( quoted_string [port integer] | ipv4_address [port integer] | ipv6_address [port integer] ); ...
named.conf(4) OSS System Calls Reference Manual transfer-source ( ipv4_address | * ) [ port ( integer | * ) ]; transfer-source-v6 ( ipv6_address | * ) [ port ( integer | * ) ]; alt-transfer-source ( ipv4_address | * ) [ port ( integer | * ) ]; alt-transfer-source-v6 ( ipv6_address | * ) [ port ( integer | * ) ]; use-alt-transfer-source boolean; zone-statistics boolean; key-directory quoted_string; allow-v6-synthesis { address_match_element; ...
Files named.conf(4) allow-notify { address_match_element; ... }; forward ( first | only ); forwarders [ port integer ] { ( ipv4_address | ipv6_address ) [ port integer ]; ...
null(7) OSS System Calls Reference Manual NAME null - Is a data sink file SYNOPSIS /dev/null DESCRIPTION Data written on a null special file is discarded. Reads from a null special file always return 0 (zero) bytes.
Files saveabend(4) NAME saveabend - Is a file containing a memory image DESCRIPTION See the core(4) reference page.
signal(4) OSS System Calls Reference Manual NAME signal - Contains definitions and variables used by signal functions SYNOPSIS #include DESCRIPTION The signal.h header file contains: • Declarations of symbolic constants used to refer to the signals that occur in the OSS environment. • Declarations for the sigset_t type and the sigaction structure.
Files signal(4) A process can elect to ignore the delivery of some signals, while allowing the system to perform default actions upon the delivery of other signals. The system also allows processes to install process-specific signal-catching functions. During the time between the generation of a signal and its delivery, the signal is said to be pending. Usually, this interval cannot be detected by an application. However, a signal can be blocked from delivery to a process.
signal(4) OSS System Calls Reference Manual The Signals The following table lists each signal name and corresponding signal number and default action. On receipt of one of these signals, the application can elect to: • Accept the default action; see Default Action, later in this reference page. • Ignore the signal; see Ignoring a Signal, later. • Catch the signal by invoking a signal-specific function; see Catching a Signal, later.
Files signal(4) SIGURG SIGUSR1 SIGUSR2 SIGWINCH 5 16 17 12 Discard signal Terminate process Terminate process Discard signal Urgent condition on I/O channel User-defined signal 1 User-defined signal 2 Terminal device window size changed For details of the process loop timer, see the SETLOOPTIMER procedure in the Guardian Procedure Calls Reference Manual.
signal(4) OSS System Calls Reference Manual — A file group ID that is the same as the effective group ID of the receiving process Note that the location of the saveabend file is different in the OSS environment than in the Guardian environment. In the Guardian environment, the file is created on the same subvolume as the program file. In the OSS environment, the file is created in the current working directory. Saveabend files are known on most UNIX systems as core files.
Files signal(4) The signal-catching function can cause the process to resume in a different context by calling the longjmp( ) function. When the longjmp( ) function is called, the process reverts to the state saved by a corresponding call to the setjmp( ) function.
signal(4) OSS System Calls Reference Manual STANDARDS CONFORMANCE The HP implementation does not provide the following signals defined in the XPG4 Version 2 specification: • SIGBUS, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, SIGVTALRM, SIGXCPU, and SIGXFSZ. The POSIX standards leave some features to the implementing vendor to define. The following features are affected in the HP implementation: • HP-specific signals are supported; see the extensions listed later.
Files spthread.h(4) NAME spthread.h - Thread-aware header file SYNOPSIS #include DESCRIPTION The header file contains the standard POSIX threads library API definitions. For reference, this reference page also documents the nonstandard POSIX extensions, thread-aware functions, thread-aware toolkit APIs, and thread-aware $RECEIVE APIs that are implemented in T1248 POSIX threads.
spthread.
Files spthread.
spthread.
Files spthread.h(4) int spt_sigaction( int, const struct sigaction *, struct sigaction * ); unsigned int spt_sleep( unsigned int ); int spt_usleep( unsigned int ); int spt_pause( ); int spt_sigpending( sigset_t * ); int spt_sigsuspend( const sigset_t * ); int spt_sigwait( sigset_t *, int * ); Thread-Aware Function Definitions If invoking a thread-aware function using the corresponding native UNIX function, first define SPT_THREAD_AWARE.
spthread.h(4) OSS System Calls Reference Manual int spt_gets( FILE *stream ); int spt_getw( FILE *stream ); wint_t spt_getwc( FILE *stream ); wint_t spt_getwchar( void ); int spt_printf( const char *format, ...
Files spthread.
spthread.
Files tar(4) NAME tar - Describes the extended tar archive file format SYNOPSIS #include DESCRIPTION tar archives are created by the tar command. These archives are standardized and suitable for porting between different systems. An extended tar archive or file consists of a series of blocks. Each block is a fixed size of 512 bytes. Each file within the archive is represented by a header block and zero or more data blocks that contain the contents of the file.
tar(4) OSS System Calls Reference Manual Symbolic constants used in the header block are defined in the header file /usr/include/tar.h.
Files tar(4) of the error and does not attempt to store the link in the archive. The mode field contains 9 bits specifying file permissions and 3 bits specifying the set user ID (TSUID), set group ID (TSGID), and unused TSVTX modes. When the user restoring the files from the archive does not have appropriate permission to set these bits, the bits for which the user does not have permission are ignored. The uid and gid fields are the user and group ID of the file’s owner and group, respectively.
termcap(4) OSS System Calls Reference Manual NAME termcap - Describes the terminal capability database SYNOPSIS /etc/termcap DESCRIPTION The termcap database describes terminals. It is used, for example, by the libtermcap library. Terminals are described in termcap by giving a set of capabilities that they have and by describing how operations are performed. Padding requirements and initialization sequences are also included in termcap. Entries in termcap consist of fields separated by colons (:).
Files termcap(4) str String capabilities, which give character sequences that can be used to perform particular terminal operations. The following table describes the capabilities used to describe terminals. Notes to the table: N Indicates numeric parameter(s). P Indicates that padding can be specified. * Indicates that padding can be based on the number of lines affected. o Indicates that the capability is obsolete. New software should not rely on this capability at all. Table 11−11.
termcap(4) dm dN DO do ds dT dV ec ed ei eo EP es ff fs gn hc HD hd ho hs hu hz i1-i3 IC ic if im in iP ip is it K1 K2 K3 K4 K5 k0-k9 kA ka kb kC kD kd kE ke kF 11−48 OSS System Calls Reference Manual L str L num L str L str L L str L num L num L str L str L str L bool L bool L L bool L str L str L bool L bool L bool L str L str L bool L L str L bool L str L str L str L str L str L bool L L str L str L str L num L str L L str L str L str L str L str L str L str L str L str L str L str L str L L str L st
Files termcap(4) kH kh kI kL kl kM km kN kn ko kP kR kr kS ks kT kt ku l0-l9 LC LE le li ll lm ma mb md me mh mi mk ml mm mo mp mr ms mu nc nd NL nl ns nw OP os 527186-005 L str L str L str L L str L str L str L bool L str L num L L str L str L str L str L str L str L str L str L L str L str L bool L str L str L num L L str L num L str L str L str L L str L str L bool L str L str L str L str L str L str L bool L L str L bool L str L bool L str L L bool L str L bool L bool L L L L L L L L L L (o) L L (o
termcap(4) pb pc pf pk pl pO po ps pt px r1-r3 rc rf RI rp rs sa sc se SF sf sg so SR sr st ta tc te ti ts UC uc ue ug ul UP up us vb ve vi vs vt wi ws xb 11−50 OSS System Calls Reference Manual L num L str L L str L str L str L str L str L str L L bool L str L str L str L L str L str L str L str L str L str L str L str L str L L num L str L str L str L str L str L str L L str L str L str L bool L str L str L L num L bool L str L str L str L str L str L L str L str L num L str L num L bool L L L L L L
Files termcap(4) xn xo xr xs xt xx L bool L bool L L bool L bool L bool L L bool L L L L (o) L L L L (o) L Newline ignored after 80 columns (Concept) L Terminal uses xoff/xon (DC3/2DC1) handshaking L L Return acts like ce cr nl (Delta Data) L Standout not erased by overwriting (Hewlett-Packard terminals) L Tabs ruin magic so character (Teleray 1061 terminal) L L Tektronix 4025 terminal insert-line A Sample Entry The following entry, which describes the Concept-100, is among the more complex entries i
termcap(4) OSS System Calls Reference Manual string capability, it must be encoded as \200. (The routines that deal with termcap use C strings and strip the high bits off the output very late, so that \200 has the same result as \000.) In the termcap file, individual capabilities must sometimes be commented out. To do this, put a . (dot) before the capability name. For example, see the first cr and ta capabilities in the preceding example.
Files termcap(4) :am:bl=ˆG:cl=ˆZ:co#80:cr=ˆM:do=ˆJ:le=ˆH:li#24:sf=ˆJ: Parameterized Strings Cursor addressing and other strings requiring parameters are described by a parameterized string capability, with escape encodings like those of the printf( ) function (%x) in it, while other characters are passed through unchanged. For example, to address the cursor, the cm capability is given, using two parameters: the row and column to move to.
termcap(4) OSS System Calls Reference Manual Cursor Motions If the terminal has a fast way to home the cursor (to the upper left-hand corner of the screen), this can be given as the ho capability.
Files termcap(4) Keypad Support If the terminal has a keypad that transmits codes when the keys are pressed, this information can be provided in termcap. Note that it is not possible to handle terminals where the keypad works only in local mode (this applies, for example, to the unshifted Hewlett-Packard 2621 terminal’s keys). If the keypad can be set to transmit or not transmit, specify the ks and ke capabilities. Otherwise, the keypad is assumed to always transmit.
termcap(4) OSS System Calls Reference Manual terminal.) Tabs and Initialization If the terminal needs to be in a special mode when running a program that uses these capabilities, the codes to enter and exit this mode can be specified by the ti and te capabilities. This need arises, for example, from terminals like the Concept terminal with more than one page of memory.
Files termcap(4) Special strings to go to a position in the status line and to return from the status line can be given as the ts and fs capabilities. (Note that fs must leave the cursor position in the same place that it was before ts. If necessary, the strings from the sc and rc capabilities can be included in ts and fs to get this effect.) The ts capability takes one parameter, which is the column number of the status line to which the cursor is to be moved.
termcap(4) OSS System Calls Reference Manual pf, is transparently passed to the printer while pO is in effect. Similar Terminals If there are two very similar terminals, one can be defined as being just like the other with certain exceptions. The tc string capability can be given with the name of the similar terminal. This capability must be specified last, and the combined length of the entries must not exceed 1024. The capabilities given before tc override those in the terminal type invoked by tc.
Files termios(4) NAME termios - Describes the terminal interface for POSIX compatibility SYNOPSIS #include DESCRIPTION The /usr/include/termios.h header file contains information used by system calls that apply to terminal files. The definitions, values, and structure in this file are required for compatibility with the Institute of Electrical and Electronics Engineers (IEEE) P1003.1 Portable Operating System Interface for Computer Environments (POSIX) standard.
termios(4) c_oflag OSS System Calls Reference Manual IXON Enables start and stop output control. If set, a received STOP character suspends output and a received START character restarts output. The START and STOP characters perform flow control functions, but they are not read. This flag is initially set by default. PARMRK Marks parity errors.
Files termios(4) CSTOPB Specifies the number of stop bits. If set, two stop bits are sent; if not set, only one stop bit is sent. Higher baud rates require two stop bits. (At 110 baud, for example, 2 stop bits are required.) CS5 Specifies a data byte of 5 bits. This value is ignored in the current release. CS6 Specifies a data byte of 6 bits. This value is ignored in the current release. CS7 Specifies a data byte of 7 bits. CS8 Specifies a data byte of 8 bits. HUPCL Hangs up on last close.
termios(4) OSS System Calls Reference Manual characters, respectively. The time value represents tenths of a second. IEXTEN Enable extended (implementation-defined) functions. Not supported in the current release. ISIG Enables signals. If set, each input character is checked against the INTR and QUIT special control characters. If a character matches one of these control characters, the function associated with that character is performed. If ISIG is not set, checking is not done.
Files termios(4) VSTART Indexes the START control character (), which resumes output that has been suspended by a STOP character. START characters are ignored if the output is not suspended. VSTOP Indexes the STOP control character (), which can be used to temporarily suspend output. This character is recognized during both input and output if IXOFF (input control) or IXON (output control) is set.
termios(4) OSS System Calls Reference Manual RELATED INFORMATION Commands: sh(1). Functions: tcflow(3), tcflush(3), tcsetattr(3). STANDARDS CONFORMANCE The HP implementation does not support the following symbolic values for the c_oflag field in the XPG4 Version 2 specification: • 11−64 BSDLY, CRDLY, FFDLY, NLDLY, OFILL, TABDLY, and VTDLY.
Files tty(7) NAME tty - Is the general terminal interface SYNOPSIS #include DESCRIPTION The tty interface is the general interface for terminal devices. This interface supplies all the functions needed for I/O over console serial lines, workstation screens, keyboards, and other terminal devices. It consists of the special file /dev/tty and terminal drivers used for conversational computing.
tty(7) OSS System Calls Reference Manual process group. With the setpgid( ) function, other processes can be added to a process group. A controlling terminal can have a process group associated with it that is known as the foreground process group. The terminal’s foreground process group is the one that receives signals generated by the VINTR, VQUIT, and VSUSP special control characters.
Files tty(7) VMIN=0, VTIME=0 In this case, either the number of requested bytes or the number of currently available bytes is returned, depending on which is less. The read( ) function call returns 0 (zero) if no data was read. Canonical mode is entered by setting the ICANON flag of the c_lflag field in the terminal’s termios structure. Other input processing is performed according to the other flags set in the c_iflag and c_lflag fields. Input Editing A terminal ordinarily operates in full-duplex mode.
tty(7) OSS System Calls Reference Manual echoed as a return and does not terminate canonical mode input. Input Modes The termios structure has an input mode field c_iflag, which controls basic terminal input characteristics. These characteristics are masks that can be bitwise inclusive ORed. The masks include: BRKINT An interrupt is signaled on a break condition. ICRNL All carriage returns are mapped to newline characters when input. IGNBRK Break conditions are ignored.
Files tty(7) Input Echoing and Redisplay The terminal driver has several modes for handling the echoing of terminal input, controlled by bits in the c_lflag field of the termios structure. Erasing Characters From a CRT When a CRT terminal is in use, the ECHOE bit of the c_lflag field of the termios structure can be set to cause input to be erased from the screen with a backspace-space-backspace sequence when character-deleting or word-deleting sequences are used.
tty(7) OSS System Calls Reference Manual SIGTTOU signal, the writes to the terminal are allowed and the SIGTTOU signal is not sent. If TOSTOP is set, if the writing process’s process group is orphaned, and if SIGTTOU is not blocked by the writing process, the write operation returns the value -1 with errno set to [EIO] and does not a send a signal.
Files tty(7) RELATED INFORMATION Functions: tcdrain(3), tcflush(3), tcgetattr(3), tcgetpgrp(3), tcsendbreak(3), tcsetattr(3), tcsetpgrp(3). Commands: sh(1). Files: termios(4).
Section 12. Miscellaneous This section contains reference pages for some miscellaneous Open System Services (OSS) topics. These reference pages reside in the cat5 directory and are sorted alphabetically by U.S. English conventions in this section.
ascii(5) OSS System Calls Reference Manual NAME ascii - Describes the octal, hexadecimal, and decimal ASCII character sets DESCRIPTION The octal character set is as follows: Table 12−1.
Miscellaneous ascii(5) The decimal character set is as follows: Table 12−3.
environ(5) OSS System Calls Reference Manual NAME environ - Contains the user environment SYNOPSIS extern char **environ; DESCRIPTION An array of strings called the environment is made available by the execl( ), execle( ), execlp( ), execv( ), execve( ), execvp( ), tdm_execve( ), or tdm_execvep( ) function when a process begins. The same array is optionally made available by the tdm_spawn( ) or tdm_spawnp( ) function when a process begins.
Miscellaneous environ(5) CELL_ADMIN_PW Specifies the default password assigned to the accounts created when the registry database is created, including the account for the registry creator. Used by the dce_config command. The default is -dce-. CELL_NAME Specifies the name of the cell (without the /.../) on which the configuration is being performed. Used during security server configuration by the dce_config command.
environ(5) OSS System Calls Reference Manual COPY_CONFIG_INFO Specifies whether the configuration should be copied from another virtual host. Used by the dce_config command. Copying implies that an additional CDS or security server is being configured to be a replica of the virtual host named by the COPY_CONFIG_HOST environment variable. Valid values are: y Indicates that copying should occur n Indicates that copying should not occur The default is n.
Miscellaneous environ(5) start or do not respond until the specified process is running. DCE_SOCKET_REUSE Specifies whether the IP address for the dced process is reused when the process is restarted. Valid values are: 0 (zero) The address is not reused. 1 The socket SO_REUSEADDR option is used at the time of binding port 135 so that even if the port is used by another process, dced restarts sucessfully. The default is 0 (zero). Used by the dce_config command.
environ(5) OSS System Calls Reference Manual DISPLAY_THRESHOLD Specifies the messages to write to the standard output file. Valid values are: DEBUG DETAIL ERROR WARNING SUMMARY VERBOSE The default is SUMMARY. Used by the dce_config command. DO_CHECKS Controls whether the prompt Press to continue, CTRL-C to exit: is returned when dce_config encounters a nonfatal error. This prompt forces the user to acknowledge the error and offers a way to exit dce_config.
Miscellaneous environ(5) ENV Specifies the path used to find the script to be executed when the shell is invoked. EXINIT Provides a start-up list of commands read by the vi utility. EXIT_ON_ERROR Indicates whether dce_config exits in the event of a fatal error. Valid values are: y Indicates that dce_config exits when it encounters a fatal error n Indicates that dce_config does not exit when it encounters a fatal error The default is n.
environ(5) OSS System Calls Reference Manual ll_TT.CODESET ll Is a 2-letter, lowercase abbreviation for the language name. The abbreviations come from ISO 639. For example: en English fr French ja Japanese de German (from Deutsch) TT Is a 2-letter, uppercase abbreviation for the territory name. The abbreviations come from ISO 3166. For example: US United States of America JP Japan NL The Netherlands ES Spain (from España) CODESET Is the name of the code set or encoding method.
Miscellaneous environ(5) LC_MONETARY Sets the locale to be used for formatting monetary values. See the description of LANG for locale name syntax. LC_NUMERIC Sets the locale to be used for formatting and parsing numeric values. See the description of LANG for locale name syntax. LC_TIME Sets the locale to be used for formatting and parsing date and time values. See the description of LANG for locale name syntax.
environ(5) MXCMP OSS System Calls Reference Manual Determines the pathname of the NonStop SQL/MX release 1 compiler. /G/system/system/mxcmp is the default. Used by the compiler utilities. MXCMPUM Determines the pathname of the NonStop SQL/MX release 2 compiler. /usr/tandem/sqlmx/bin/mxCompileUserModule is the default. Used by the compiler utilities. MXSQLC Determines the pathname of the NonStop SQL/MX preprocessor, mxsqlc. /usr/tandem/sqlmx/bin/mxsqlc is the default. Used by the c89 command.
Miscellaneous environ(5) PS1 Specifies the primary prompt string used by the shell. PS2 Specifies the secondary prompt string used by the shell. PS3 Specifies the selection prompt string used by the shell within a loop. PS4 Specifies the prompt string used by the shell during an execution trace. PWD Specifies the user’s initial working directory, as known to the osh command. The value is converted from the Guardian PARAM PWD. PWD_MGMT_SVR Specifies the pathname of the Password Management server.
environ(5) OSS System Calls Reference Manual REPLICATE_ALL_DIRS Specifies whether to replicate all directories from the master CDS server database to the additional CDS server database during additional CDS server configuration. Used by the dce_config command. The value y indicates that all directories should be replicated. The value n indicates that no directories should be replicated. The default is n. REPLICATE_DIR_LIST Specifies a list of directories to be replicated. Used by the dce_config command.
Miscellaneous environ(5) SQLMX_PREPROCESSOR_VERSION Indicates the preprocessor rules and features to be used. Specifying the value 800 causes rules and features associated with release 1.8 to be used; the mxcmp compiler is used and only MDF files and annotated source files are produced, while rules and features associated with release 2.0 and later are ignored. Specifying a value of 1200 or larger or not specifying a value causes rules and features associated with release 2.
environ(5) OSS System Calls Reference Manual process is used. TCPIP_RESOLVER_NAME Specifies the OSS pathname to be used instead of /etc/resolv.conf to identify the dynamic name server to be used when resolving Internet addresses. Equivalent to the Guardian environment DEFINE =TCPIPˆRESOLVERˆNAME. TCPIP_RESOLVER_ORDER Controls the search order for TCP/IPv6 when OSS socket calls require access to addresses for a given host.
Miscellaneous environ(5) TIME_SERVER Specifies the virtual host that the security client will try to synchronize its clock against. This host must have a DTS server (dtsd) running on it. The recommended choice for the host is the one running the master security server (the name specified in the SEC_SERVER variable). Used by the dce_config command. TMOUT Specifies the number of seconds the shell waits for a response to a prompt before timing out.
environ(5) OSS System Calls Reference Manual alternative time is assumed to be one hour ahead of standard time. One or more digits can be used; the value is always interpreted as a decimal number. The hour is between 0 (zero) and 24, and the minutes (and seconds) are between 0 (zero) and 59. Use of values outside these ranges causes undefined behavior.
Miscellaneous environ(5) Valid values are: y Indicates that clones should be updated n Indicates that clones should not be updated The default is n. Used by the dce_config command. USE_DEF_MSG_PATH Specifies whether to use the default pathname when installing DCE message catalogs. Used by the dce_config command. The value y indicates that message catalogs should be installed in the default directory /usr/lib/nls/msg/en_US.ISO8859-1.
environ(5) OSS System Calls Reference Manual frequently exported by .profile files, such as PS1, PS2, and IFS. RELATED INFORMATION Commands: c89(1), dce_config(8) if installed, gtacl(1), osh(1), sh(1). Functions: catopen(3), exec(2), getenv(3), iconv_open(3), putenv(3), syslog(3), tdm_execve(2), tdm_execvep(2). Files: termcap(4).
Miscellaneous errno(5) NAME errno - Returns the error condition value SYNOPSIS #include DESCRIPTION The errno external variable contains the most recent error condition set by a function. The symbolic error names returned by a function and descriptions of each error condition are shown in the ERRORS section in the individual function reference pages. The errno.h header file contains a list of all symbolic error names and a one-line description of each.
errno(5) OSS System Calls Reference Manual [EBIGDIR] The positioning within an OSS directory failed because there were more than 65535 file names beginning with the same two characters in the directory. [EBUSY] Mount device busy. The program attempted to use a system resource that is not currently available, because it is being used by another process in a manner that would conflict with the request being made by this process. [ECHILD] No child process.
Miscellaneous errno(5) [EFILEBAD] Corrupt Guardian file or bad EDIT file structure. The program used the open( ) or read( ) function for an EDIT file (Guardian file code 101) in /G (the Guardian file system) that has an internal structure problem. [EFSBAD] Fileset catalog internal consistency error. The program attempted an operation involving a fileset with a corrupted fileset catalog. [EFSERR] File system internal error.
errno(5) [EINVAL] OSS System Calls Reference Manual Invalid function parameter. One of the following conditions exists: • The program supplied an invalid parameter value. • The system does not support execution of a new program file in the binary format used by a specified program file. [EIO] I/O error. Some physical input or output error has occurred. Either a file cannot be opened because of an input or output error or data has been lost during an input or output transfer.
Miscellaneous errno(5) [ENETUNREACH] Network unreachable. No path exists between the node and the network. [ENFILE] File table overflow. Too many files are currently open in the system. The system has reached its predefined limit for simultaneously open files and temporarily cannot accept requests to open another one. [ENOBUFS] Buffer space unavailable. No buffer space is available. [ENOCPU] CPU unavailable.
errno(5) OSS System Calls Reference Manual [ENOSPC] No space left on device. During the write( ) function on a regular file or when extending a directory, there is no free space left on the device. [ENOSYS] Function not implemented. An attempt was made to use a function that is not available in this implementation. [ENOTCONN] Socket not connected. The socket is not connected. [ENOTDIR] Not a directory. The program attempted a directory operation on an object that is not a directory.
Miscellaneous [EPIPE] errno(5) Broken pipe or no reader on socket. The program attempted to write on a pipe, FIFO, or socket for which there is no process to read the data. [EPROTONOSUPPORT] Protocol not supported. The program specified a protocol that is not supported. [EPROTOTYPE] Wrong protocol type. The program specified the wrong protocol for the type of socket. [ERANGE] Value out of range. A program expression evaluated to a value that is out of range (too large or too small).
errno(5) OSS System Calls Reference Manual [EXDEV] • The processor for the disk process of the specified file failed during an input or output operation and takeover by the backup process occurred. • An open file descriptor has migrated to a new processor, but the new processor lacks a resource or system process needed for using the file descriptor. Cross-device link. The program attempted to link to a file on another fileset. [EXDRDECODE] XDR decoding error. An XDR decoding error occurred.
Miscellaneous filename(5) NAME filename, pathname - Explain OSS file system file naming SYNOPSIS For OSS files: filename pathname For local Guardian disk files used from the OSS environment: /G/volume_name/subvolume_name/file_id For local Guardian temporary disk files used from the OSS environment: /G/volume_name/temp_file_id For local Guardian nondisk devices used from the OSS environment: /G/device_name/qualifier For remote Guardian disk files used from the OSS environment: /E/node_name/G/volume_name/
filename(5) OSS System Calls Reference Manual a single slash. An absolute pathname begins with a slash character. An absolute pathname identifies an OSS file with respect to the current root directory. A relative pathname does not begin with a slash character. A relative pathname identifies an OSS file with respect to the current working directory. The filename_1 parameter specifies a directory. If filename_1 is a single period character (.
Miscellaneous filename(5) qualifier Specifies a unique identifier significant to the device. A qualifier is a character string of two to eight valid characters. The first character must be a number sign (#). Valid characters for the rest of the string are the letters a through z, and the digits 0 through 9. (Uppercase letters A through Z are accepted but converted to lowercase letters.) The second character must be a letter. DESCRIPTION This reference page describes file-naming rules.
filename(5) • OSS System Calls Reference Manual Unnamed processes The type of object determines the syntax for the Guardian filename and which subset of the permitted characters is allowed in the parts of that filename. For a disk file, the Guardian filename consists of the following four parts, separated by periods: node name A character string of two to eight valid characters, specifying the node within the NonStop server Expand network. The first character must be a backslash (\).
Miscellaneous filename(5) qualifier A character string of two to eight valid characters, specifying a unique identifier significant to the device. The first character must be a number sign (#). Valid characters for the rest of the string are the letters A through Z and the digits 0 through 9. The second character must be a letter. For a named process, Guardian filename rules are complex. Guardian named processes are not accessible through the OSS file system, so the rules are not discussed here.
filename(5) OSS System Calls Reference Manual • Lowercase letters are not translated to uppercase for filename pattern matching. Pattern matching is case-insensitive in the Guardian file system. • Slashes between OSS filenames are translated to periods. EXAMPLES 1. The following is an example of an absolute OSS pathname: /usr/ccomp/prog1.c 2. The following is an example of an absolute OSS pathname: /usr/ccomp/prog1.c 3.
Miscellaneous filename(5) 12. The following is an example of translating a Guardian filename to an OSS pathname. If \LOCAL.$ZTNT.#PTY0001 is a nondisk device that needs to be passed to an OSS function, it can be referred to by specifying /G/ztnt/#pty0001. NOTES Guardian subvolume names and file identifiers beginning with the letter Z are reserved. Do not use such names for files in the /G directory.
hier(5) OSS System Calls Reference Manual NAME hier - Explains the OSS file system hierarchy DESCRIPTION This reference page describes the file system hierarchy. Subdirectories (and some files) are listed indented after the directory that they appear in. / Root directory of the local OSS file system. /bin/ Utility program files, including system and internationalization utilities.
Miscellaneous hier(5) usr/ G-series TNS or accelerated files corresponding to the native files found in /usr/. share/man/ Reference page files for use with the apropos, man, and whatis commands when the corresponding G-series TNS or accelerated function or utility cannot be described in the reference page files found in /usr/share/man/. Use the command man -M /nonnative/usr/share/man topic to read these reference pages.
pathname(5) OSS System Calls Reference Manual NAME pathname - Explains OSS file system path naming DESCRIPTION See the filename(5) reference page.
Miscellaneous process_extension_results(5) NAME process_extension_results - Contains the status of a process creation attempt SYNOPSIS #include struct process_extension_results ∗ pr_results; PARAMETERS pr_results Points to the output structure containing optional process identification and error information. In case of error, this structure provides additional information including the PROCESS_LAUNCH_ procedure error and error detail. The structure is defined in the tdmext.h header file.
process_extension_results(5) OSS System Calls Reference Manual RETURN VALUES Upon successful completion of the function call, this structure returns the following information: pr_len Specifies the size in bytes of the structure. This value is the one specified as input. pr_phandle Contains the Guardian process handle of the new process. pr_pid Contains the OSS process ID of the new process. pr_errno Contains the OSS error number normally returned in errno.
Miscellaneous process_extension_results(5) _TPC_BAD_ENVIRON One of the pointers in the environ array is invalid. Issued for: tdm_execve( ), tdm_execvep( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_ENVP The pointer to the envp[ ] array parameter of the calling function or one of the entries in the array is invalid. Issued for: tdm_execve( ), tdm_execvep( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_ERROR_DETAIL An internal OSS software error occurred.
process_extension_results(5) OSS System Calls Reference Manual _TPC_BAD_OUTPUT An internal OSS software error occurred. If the problem persists, follow site-defined procedures for reporting software problems to HP. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ). _TPC_BAD_OUTPUT_LEN An internal OSS software error occurred. If the problem persists, follow site-defined procedures for reporting software problems to HP. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ).
Miscellaneous process_extension_results(5) _TPC_BAD_SWAP The pointer to the pe_swap_file_name field in the structure pointed to by the pe_parms parameter of the calling function is invalid. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_UC The file parameter pointer of the calling function is invalid. Issued for: tdm_execve( ), tdm_execvep( ), tdm_spawn( ), tdm_spawnp( ).
process_extension_results(5) OSS System Calls Reference Manual _TPC_BAD_DEFINES The pe_defines field in the structure pointed to by the pe_parms parameter of the calling function is invalid. Issued for: tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_EXTENSION The structure pointed to by the pe_parms parameter of the calling function and used in the function call is invalid. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ).
Miscellaneous process_extension_results(5) _TPC_BAD_JOB The pe_jobid field in the structure pointed to by the pe_parms parameter of the calling function contains an invalid value. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_MEM The pe_memory_pages field in the structure pointed to by the pe_parms parameter of the calling function contains an invalid value. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ).
process_extension_results(5) OSS System Calls Reference Manual _TPC_BAD_PIMFILE An internal OSS software error occurred. If the problem persists, follow site-defined procedures for reporting software problems to HP. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_PRIO The pe_priority field in the structure pointed to by the pe_parms parameter of the calling function contains an invalid value.
Miscellaneous process_extension_results(5) For information about specific Guardian file-system errors, see the discussion of file-system errors in the Guardian Procedure Errors and Messages Manual. RELATED INFORMATION Functions: tdm_execve(2), tdm_execvep(2), tdm_fork(2), tdm_spawn(2), tdm_spawnp(2). STANDARDS CONFORMANCE This structure is an extension to the XPG4 Version 2 specification.
resolv.conf(5) OSS System Calls Reference Manual NAME resolv.conf - BIND 9 Domain Name System resolver configuration file DESCRIPTION The default configuration file /etc/resolv.conf provides an explicit default domain name for the Domain Name System (DNS) to use, and identifies name servers on other processors. The BIND 9 resolver system can be used with other, nondefault versions of resolv.conf. Each entry in a resolv.
Miscellaneous resolv.conf(5) might be slow and generates a lot of network traffic if the servers for the listed domains are not local. Queries time out if no server is available for one of the domains. The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance takes precedence. sortlist addresslist Allows addresses returned by internal function calls to be sorted. An addresslist is specified by IP address netmask pairs.
resolv.conf(5) OSS System Calls Reference Manual RELATED INFORMATION Commands: dnssec_named(8), named(8). Functions: gethostbyaddr(3), gethostbyname(3), gethostbyname2(3), setnetent(3). Files: hosts(4), networks(4), protocols(4), resolv.conf(4), services(4).
Permuted Index _____________________________ spt_fputwc: Thread-aware fputwc( required by spt_regFileIOHandler( spt_fputc: Thread-aware fputc( required by spt_regTimerHandler( /Initiates thread-aware select( /Initiates thread-aware select( Renames a file (Guardian rename( a file or directory (OSS rename( Initiates thread-aware accept( Initiates thread-aware close( Initiates thread-aware connect( Initiates thread-aware fclose( Initiates thread-aware fflush( Initiates thread-aware fgetc( Initiates thread-awa
OSS System Calls Reference Manual socket accept: socket/ spt_acceptx: utime: Sets file accessibility of a file access: Determines the /excludes other users from disk/ /excludes other users from signal sigaction: Specifies the existing file/ link: Creates an /Gets a network host entry by specified/ /Obtains the stackbase /Gets a network entry by /a shared memory segment to the a network host entry by address records in/ SPT_READUPDATELOCKX: but does not wait if the mutex is synchronous/ select: Selects Guard
Permuted Index object /Obtains the stacksize object /Sets the detachstate object /Sets the guardsize /Sets the inherit scheduling object /of the scheduling policy /Sets the scheduling policy object /Sets the stacksize /Obtains the stackbase address /Destroys a thread /Initializes a thread /Destroys a condition variable /Initializes a condition variable /Destroys a mutex /Initializes a mutex attribute of the specified thread detachstate attribute of a thread guardsize attribute of a thread stacksize attribut
OSS System Calls Reference Manual Gets the process group ID of the to the address space of the the scheduling priority of the pthread_exit: Terminates the the thread identifier of the cancelation request to the pthread_join: Causes the pthread_setcancelstate: Sets the pthread_setcanceltype: Sets the /cleanup-handler routine from the /routines to be called when the /Examines or changes the once by a single/ pthread_once: /Sets the calling thread’s /Sets the calling thread’s /Requests delivery of a pending op
Permuted Index pipe: Creates an interprocess SPT_FILE_OPEN_: Establishes a socket: Creates an endpoint for pthread_equal: the terminal interface for POSIX gamma function/ gamma_r: gamma function/ lgamma_r: /Gets level of /Sets level of /Sets the number of used /Gets the number of /Initializes the tfile for errno: Returns the error pthread_cond_destroy: Destroys a pthread_cond_init: Initializes a that are waiting on the specified object /Destroys a object /Initializes a /that is waiting on the specified that
OSS System Calls Reference Manual fork: extensions tdm_fork: returns the ID of an/ semget: the process group ID setsid: segment or returns the/ shmget: sockets socketpair: environment or rewrites/ creat: /a file for reading or writing, symlink: pthread_create: entry for an existing file/ link: communications socket: communication channel pipe: for a message queue msgget: /Contains the status of a process gets the value of the file mode for the controlling terminal/ Epoch into a date and time/ for an existin
Permuted Index signal/ signal: Contains pthread_delay_np: key pthread_key_delete: Marks a thread object for pthread_testcancel: Requests Specifies the action to take upon file format ar: archive file format cpio: archive file format tar: directories dir: and decimal ASCII/ ascii: database termcap: for POSIX compatibility termios: close: Closes a file dup: Duplicates an open file /Sets interest in file /Unregisters an OSS file and controls an open file Waits on read-ready file Waits on write-ready file ) fun
OSS System Calls Reference Manual /configuration file for BIND 9 resolv.
Permuted Index an argv array, and an/ execve: extensions tdm_execve: extensions tdm_execvep: extensions tdm_spawn: extensions tdm_spawnp: by/ spt_FileIOHandler_p: by the/ spt_OSSFileIOHandler_p: by/ spt_TimerHandler_p: stack and optionally function spt_getchar: pthread_delay_np: Delays specified/ spt_sleep: Suspends specified/ spt_usleep: Suspends Requests that a thread terminate pathname, an argv array, and/ pathname, an argv array, and an/ filename, an argv array, and/ additional directory entry for an OS
OSS System Calls Reference Manual /Waits on write-ready /Sets interest in /Unregisters an OSS Duplicates and controls an open version) spt_closex: Closes a /Duplicates and controls an open select( ) function for a single a callback/ /Registers the fcntl: Controls open select: Selects among spt_fcntlx: Controls open select( ) function for mulitple from accessing a Guardian disk a set of functions that execute a the owner and group IDs of a of a subsequent write to the or rewrites an existing server/ named.
Permuted Index argument/ execl: Executes a argument/ execle: Executes a array, and/ execv: Executes a array, and an/ execve: Executes a tdm_execve: Executes a tdm_execvep: Executes a chmod: Changes fchmod: Changes lchmod: Changes Guardian file SPT_ execlp: Executes a file using a execvp: Executes a file using a file naming Registers $RECEIVE ioctl: Controls device an existing file on the current file fstatvfs: Gets pathname statvfs: Gets /sets device-dependent Guardian limits for floating-point/ Specifies t
OSS System Calls Reference Manual Initiates thread-aware fprintf( ) Initiates thread-aware fputs( ) Initiates thread-aware fread( ) Initiates thread-aware fwrite( ) Initiates thread-aware getc( ) Executes thread-aware getchar( ) Initiates thread-aware gets( ) Initiates thread-aware getw( ) Initiates thread-aware getwc( ) thread-aware getwchar( ) Initiates thread-aware printf( ) Initiates thread-aware putc( ) Initiates thread-aware putchar( ) Initiates thread-aware puts( ) Initiates thread-aware putw( ) Init
Permuted Index scheduling priority entry by name (reentrant) protocol entry by number/ protocol entry (reentrant) information from the user/ information from the user/ information from the user/ spt_gets: Initiates thread-aware input stream/ spt_fgetcx: input stream/ spt_getcx: standard input/ spt_getcharx: (reentrant) gethostbyname_r: (reentrant) getnetbyaddr_r: (reentrant) getnetbyname_r: address/ gethostbyaddr_r: name/ getservbyname_r: port number/ getservbyport_r: (reentrant) getprotobyname_r: (reentran
OSS System Calls Reference Manual from the network services/ getservent_r: Gets the next entry ................................. getservent_r(2) bound name of a socket getsockname: Gets the locally ..................................... getsockname(2) getsockopt: Gets socket options ................................... getsockopt(2) gettimeofday: Gets date and time ................................ gettimeofday(2) of the current process getuid: Gets the the real user ID ...................................
Permuted Index getpgid: Gets the process group setpgid: Sets the process group Gets the parent OSS process /semaphore set ID or returns the getpgrp: Gets the process group setgid: Sets the group setuid: Sets the user geteuid: Gets the effective user getuid: Gets the the real user /Creates a new semaphore set and sets the process group msgget: Creates or returns the /memory segment or returns the pthread_self: Obtains the thread Compares two thread uname: Gets information Changes the owner and group Changes
OSS System Calls Reference Manual function spt_getc: function spt_gets: function spt_getw: function spt_getwc: ) function spt_getwchar: function spt_printf: function spt_putc: function spt_putchar: function.
Permuted Index of the gamma function/ ar: Describes the archive limits: Specifies the system ulimit: Sets and gets file size float: Specifies the system limits /for socket connections and directory entry for an existing/ information about a symbolic Reads the value of a symbolic symlink: Creates a symbolic getgroups: Gets the group connections and limits the/ and limits the backlog/ listen: gethostname: Gets the name of the since the Epoch to broken-down getsockname: Gets the the Epoch to broken-down local/
OSS System Calls Reference Manual message/ spt_sendmsgx: Sends a msgrcv: Receives a message from a msgsnd: Sends a message to a or returns the identifier for a a message from a socket using a a message on a socket using a /a message from a socket using a /a message on a socket using a msgsnd: Sends a SPT_SERVERCLASS_SEND_: Sends a thread for a specified number of policy /Returns the a pathname to a character/ and gets the value of the file utime: Sets file access and to permanent/ fsync: Writes operations i
Permuted Index services/ getservent_r: Gets the database/ getnetent_r: Gets the database/ gethostent_r: Gets the getprotoent_r: Gets the priority of the calling process on a Guardian file opened spt_regFile: Registers the file /Unregisters a Guardian file transactions being used /Gets the transactions /Sets the of the thread for a specified spt_vfprintfx: Formats a variable spt_vprintfx: Formats a variable /Gets a protocol entry by a network service entry by port Registers the file Registers the Pathsend fi
OSS System Calls Reference Manual Gets fileset information for an SPT_ FILE_CLOSE_: closes an in the application program to an SPT_READX: returns data from an operation on a Guardian file writing, creates a regular/ open: file offset for read or write /cancels the oldest incomplete about the last server-class send Initiates a thread-aware fork() msgctl: Performs message control semop: Performs semaphore system limits for floating-point Performs semaphore control Performs shared memory control down socket se
Permuted Index Gets fileset information using a file /Creates a file or assigns a /Registers the /Registers the user-supplied /Unregisters the user-supplied reply from a server process in a to the server instance in the to the server instance in the getpeername: Gets the name of the the/ /Requests delivery of a sigpending: Examines input/output/ SPT_CONTROL: operations msgctl: records/ SPT_WRITEUPDATEUNLOCKX: operations semctl: semop: operations shmctl: data and file attributes to chmod: Changes file-access
OSS System Calls Reference Manual /receives a reply from a server kill: Sends a signal to a getpriority: Gets the OSS Sets the group ID of the calling name of the transport-provider Sets the user ID of the calling the address space of the calling /Waits for a specific child wait: Waits for any child to another thread in the current tdm_fork: Creates a new tdm_spawn: Executes a new tdm_spawnp: Executes a new a signal to a process or group of Contains the status of a process/ Guardian disk file /allows random
Permuted Index thread to wait for the/ unique thread-specific data key thread-specific data key thread global mutex for threads Destroys a mutex attributes/ Obtains the mutex type attribute/ Initializes a mutex attributes/ Sets the mutex type attribute of/ mutex mutex unlocked mutex to lock a specified mutex but/ mutex be executed once by a single/ identifier of the calling thread calling thread’s cancelability/ calling thread’s cancelability/ level of concurrency scheduling policy and scheduling/ thread-sp
OSS System Calls Reference Manual recvfrom: using a message/ recvmsg: (thread-aware/ spt_recvfromx: using a message/ spt_recvmsgx: process/ /Sends a message to and user /unlocks a Guardian file /other users from accessing a /performs random processing of /sequentially locks and reads /allows random processing of /unlocks a disk file and any spt_recv: Initiates thread-aware connected socket /Initiates thread-aware from a socket a socket using a message/ Initiates thread-aware getlogin_r: Gets login name loga
Permuted Index ) function) rename_guardian: rename: rename( ) function) rename_oss: /Sends a message to and receives a /Initiates thread-aware /delivery of a pending cancelation cancelation/ pthread_testcancel: execution pthread_cancel: ) /Executes callback type )/ /Executes callback type /Executes callback type System resolver configuration/ /BIND 9 Domain Name System dialog after the/ /Cleans up with the/ SPT_RESUMETRANSACTION: spt_generateTag: Increments and Guardian file to the/ SPT_READX: last/ SPT_SER
OSS System Calls Reference Manual semctl: Performs semop: Performs ID of an/ semget: Creates a new or returns the ID of an existing control operations set ID or returns the ID of an/ operations spt_send: Initiates thread-aware shutdown: Shuts down socket about the last server-class connected socket connected socket to the server/ /Initiates a Initiates thread-aware socket using a message structure socket send: socket send: sendto: (thread-aware/ spt_sendtox: a message structure sendmsg: a message/ spt_sendm
Permuted Index pthread_attr_setguardsize_np: pthread_attr_setinheritsched: a/ pthread_mutexattr_setkind_np: socket_transport_name_set: spt_setTMFConcurrentTransactions: and decimal ASCII character setsid: Creates a new session and control setpgid: IDs setregid: IDs setreuid: the/ pthread_attr_setschedparam: pthread_attr_setschedpolicy: pthread_setschedparam: pthread_attr_setstacksize: associated/ pthread_setspecific: SPT_TMF_SetTxHandle: process setuid: sets the process group ID calling process shmctl: Perf
OSS System Calls Reference Manual Receives a message from a operations shutdown: Shuts down Sends a message on a connected Sends a message on a connected /Accepts a new connection on a spt_connectx: Connects a /Receives a message from a /a message from a connected spt_sendtox: Sends a message on a /Receives a message from a sendmsg: Sends a message on a /Receives a message from a /Sends a message on a connected sockets Creates a pair of connected the name of the/ the name of the/ /memory segment to the addr
Permuted Index read-ready file descriptor write-ready file descriptor thread-aware fflush( ) function (thread-aware version) fgetc( ) function a specified input stream/ fgets( ) function stream (thread-aware version) thread-aware fgetwc( ) function character from a a specified/ callback type required by/ communication path between an/ thread-aware fork() operation thread-aware fprintf( ) function output to an output stream/ function specified output stream/ fputs( ) function stream (thread-aware version) )
OSS System Calls Reference Manual into scattered buffers/ (thread-aware version) open Guardian file to the/ thread-aware function for/ recv( ) function thread-aware recvfrom( )/ message from a socket/ thread-aware recvmsg(2) function from a socket using a message/ from a connected socket/ number callback type required by the file number /callback type required by the Registers the file descriptor to/ the Pathsend file number Registers the user-supplied/ /callback type required by user-supplied timer callbac
Permuted Index attributes object /Obtains the attributes object /Sets the /Gets a character from the spt_getsx: Gets a string from the /Gets a wide character from the /Prints formatted output to the /Writes a byte to the spt_putsx: Writes a string to the /Writes a wide character to the associated/ SPT_BEGINTRANSACTION: a file Increments and returns a attempt /Contains the using a pathname for a specific child process to and file attributes to permanent a wide character to a specified readdir_r: Reads a dire
OSS System Calls Reference Manual Initiates thread-aware filename: Explain OSS file hier: Explains the OSS file limits: Specifies the operations float: Specifies the pathname: Explains OSS file resolv.
Permuted Index thread pthread_self: Obtains the pthread_equal: Compares two /to yield the processor to another pthread_detach: Marks a request to the calling Delays execution of a Terminates the calling Gets the attribute object for a thread identifier of the calling pthread_cancel: Requests that a /routine to be executed when the specified/ /Unblocks at least one specified condition/ /Unblocks one and scheduling parameters of a pthread_cond_timedwait: Causes a pthread_join: Causes the calling pthread_cond_
OSS System Calls Reference Manual spt_fflushx: Flushes a stream /Gets a string from a stream /Writes a string to a stream /Reads input from a stream /Writes to an output stream /Gets a word from an input stream /Writes a word to a stream spt_readx: Reads from a file /Receives a message from a socket /Sends a message on a socket spt_writex: Writes to a file to the standard output stream from the standard input stream to the standard output stream character to a specified stream character to a specified strea
Permuted Index SPT_TMF_SetTxHandle: Sets the TMF /the tfile for concurrent /Sets the number of concurrent TMF /Gets the number of concurrent TMF the/ SPT_WRITEUPDATEX: /Gets the name of the /Sets the name of the interface terminal (reentrant) attributes/ /Obtains the mutex attributes object /Sets the mutex /Executes callback /Executes callback /Executes callback calling thread’s cancelability limits the file mode creation mask identifying the current system waiting/ pthread_cond_broadcast: is waiting/ pthre
OSS System Calls Reference Manual Returns the error condition readlink: Reads the mask umask: Sets and gets the /Destroys a condition /Initializes a condition /on the specified condition output/ spt_vfprintfx: Formats a output/ spt_vprintfx: Formats a Destroys a condition Initializes a condition on the specified condition on the specified condition /to wait either for a condition wait for the specified condition signal: Contains definitions and output stream (thread-aware output stream (thread-aware output
Permuted Index the set of blocked signals and process to stop or/ waitpid: terminate wait: /a Guardian file from an array and descriptor spt_fd_read_ready: descriptor spt_fd_write_ready: I/O spt_wakeup: sockatmark: Determines input stream/ spt_fgetwcx: Gets a input stream/ spt_getwcx: Gets a input/ spt_getwcharx: Gets a stream fputwc: Writes a stream/ spt_fputwcx: Writes a stream/ spt_putwcx: Writes a output/ spt_putwcharx: Writes a processor/ sched_yield: Signals a the server/ /Initiates a send (thread-awa
Index _____________________________ Symbols /etc/named.
OSS System Calls Reference Manual on shared memory, 7-53 controlling terminal, generating pathname for, 1-39 core file, 11-3 core memory image, 11-3 cpio archive file, 11-4 to 11-6 cpio file format, 11-4 to 11-6 creat function, 1-32 to 1-38 ctermid_r function, 1-39 to 1-40 ctime_r function, 1-41 current working directory, changing, 1-12 D data sink file, 11-26 database manipulating entry in user, 3-83, 3-85, 3-88 user, 3-47, 3-49, 3-51 decimal ASCII character set, 12-3 descriptors.
Index ECOBFE, 12-8 EDITOR, 12-8 ELD, 12-8 EMS_COLLECTOR, 12-8 ENV, 12-9 EXINIT, 12-9 EXIT_ON_ERROR, 12-9 FCEDIT, 12-9 FPATH, 12-9 Guardian PARAMs, 12-9 HISTFILE, 12-9 HISTSIZE, 12-9 HOME, 12-9 HOST_NAME_IP, 12-9 IFS, 12-9, 12-20 JAVA_HOME, 12-9 KEYSEED, 12-9 LANG, 12-9 LAN_NAME, 12-10 LC_ALL, 12-10 LC_COLLATE, 12-10 LC_CTYPE, 12-10 LC_MESSAGES, 12-10 LC_MONETARY, 12-11 LC_NUMERIC, 12-11 LC_TIME, 12-11 LD, 12-11 LOCPATH, 12-11 LOGNAME, 12-11 LOG_THRESHOLD, 12-11 MAKEFLAGS, 12-11 MANPATH, 12-11 MSGVERB, 12-11
OSS System Calls Reference Manual USE_DEF_MSG_PATH, 12-19 UTILSGE, 12-19 VISUAL, 12-19 ZCPU, 12-19 _RLD_FIRST_LIB_PATH, 12-14 _RLD_LIB_PATH, 12-14 errno external variable, 12-21 to 12-28 errno value [E2BIG], 2-8, 2-16, 2-24, 2-32, 2-40, 2-48, 4-51, 7-21, 8-13, 8-27, 8-53, 8-69, 12-21 [EACCES], 1-6, 1-9, 1-13, 1-17, 1-20, 1-24, 1-29, 1-35, 2-8, 2-16, 2-24, 2-32, 2-40, 2-48, 3-19, 4-7, 4-10, 4-16, 4-32, 4-36, 4-40, 4-44, 4-48, 4-51, 4-53, 5-10, 6-10, 6-31, 6-36, 7-14, 7-17, 7-21, 7-27, 7-31, 7-35, 7-51, 7-54,
Index [ECONNRESET], 1-3, 1-10, 1-29, 3-13, 3-69, 3-98, 3-103, 4-19, 6-5, 6-14, 6-17, 6-20, 6-24, 7-24, 7-27, 7-31, 7-47, 7-63, 7-74, 7-90, 7-102, 7-116, 7-249, 7-260, 7-267, 7-272, 7-275, 7-293, 7-299, 7-302, 7-353, 7-366, 10-15, 10-20, 12-22 [ECWDTOOLONG], 12-22 [EDEADLK], 12-22 [EDEFINEERR], 7-78, 7-85, 12-22 [EDESTADDRREQ], 1-10, 4-20, 7-24, 7-28, 7-31, 7-293, 7-299, 7-302, 12-22 [EDOM], 3-43, 4-14, 12-22 [EEXIST], 4-16, 4-36, 4-41, 4-48, 5-10, 6-32, 7-18, 7-61, 7-392, 12-22 [EFAULT], 1-3, 1-6, 1-10, 1-1
OSS System Calls Reference Manual 7-111, 7-116, 7-123, 7-125, 7-129, 7-131, 7-156, 7-162, 7-166, 7-169, 7-172, 7-175, 7-181, 7-183, 7-186, 7-191, 7-193, 7-196, 7-214, 7-219, 7-222, 7-226, 7-231, 7-233, 7-235, 7-250, 7-260, 7-268, 7-272, 7-275, 7-293, 7-299, 7-302, 7-326, 7-330, 7-353, 7-366, 7-387, 10-6, 10-12, 10-15, 10-21, 12-23 [EINVAL], 1-3, 1-6, 1-10, 1-17, 1-20, 1-24, 1-30, 1-36, 2-8, 2-17, 2-25, 2-32, 2-41, 2-49, 3-4, 3-7, 3-13, 3-36, 3-38, 3-40, 3-53, 3-70, 3-71, 3-75, 3-86, 3-89, 3-98, 3-103, 3-112
Index 8-14, 8-28, 8-54, 8-70, 12-24 [EMLINK], 4-16, 12-24 [EMSGQNOTRUNNING], 4-45, 4-48, 4-51, 4-54, 12-24 [EMSGSIZE], 7-24, 7-28, 7-32, 7-294, 7-299, 7-302, 12-24 [ENAMETOOLONG], 1-6, 1-10, 1-13, 1-17, 1-20, 1-24, 1-36, 2-8, 2-17, 2-25, 2-32, 2-41, 2-49, 4-7, 4-10, 4-16, 4-32, 4-36, 4-41, 5-11, 6-10, 6-32, 6-37, 7-28, 7-294, 7-376, 7-387, 7-392, 8-14, 8-28, 8-54, 8-70, 9-8, 9-12, 12-24 [ENETDOWN], 1-30, 3-14, 3-28, 3-37, 3-38, 3-41, 3-112, 5-11, 6-5, 6-8, 6-15, 7-9, 7-24, 7-32, 7-103, 7-117, 7-250, 7-261,
OSS System Calls Reference Manual 12-25 [ENOMSG], 4-51, 12-25 [ENONSTOP], 12-25 [ENOPROTOOPT], 3-103, 7-29, 7-48, 7-294, 12-25 [ENOREPLY], 12-25 [ENOROOT], 1-7, 1-13, 1-18, 1-21, 1-25, 1-37, 3-4, 3-7, 3-28, 4-8, 4-11, 4-17, 4-33, 4-36, 4-41, 5-12, 5-15, 6-8, 6-10, 6-33, 6-37, 7-377, 7-393, 9-9, 9-13, 12-25 [ENOSPC], 1-37, 4-17, 4-37, 4-41, 4-48, 5-12, 6-33, 7-18, 7-22, 7-61, 7-123, 7-156, 7-162, 7-166, 7-169, 7-172, 7-175, 7-214, 7-219, 7-222, 7-226, 7-231, 7-233, 7-235, 7-327, 7-330, 7-354, 7-367, 7-393, 1
Index [EOSSNOTRUNNING], 1-7, 1-14, 1-18, 1-21, 1-25, 1-37, 3-4, 3-7, 4-8, 4-11, 4-17, 4-33, 4-37, 4-42, 5-12, 5-15, 6-11, 6-33, 6-37, 7-377, 7-393, 9-9, 9-13, 12-26 [EPARTIAL], 12-26 [EPERM], 1-14, 1-18, 1-21, 1-25, 1-37, 3-5, 3-8, 3-71, 4-4, 4-8, 4-11, 4-17, 4-37, 4-42, 4-45, 5-3, 5-12, 6-33, 7-14, 7-34, 7-36, 7-37, 7-39, 7-41, 7-49, 7-55, 8-54, 8-71, 9-9, 9-13, 12-26 [EPFNOSUPPORT], 12-26 [EPIPE], 7-24, 7-29, 7-33, 7-111, 7-123, 7-156, 7-162, 7-166, 7-169, 7-172, 7-175, 7-214, 7-219, 7-222, 7-226, 7-231,
OSS System Calls Reference Manual [ENOMEM], 3-48 [EWRONGID], 3-48 error condition values, 12-21 to 12-28 exec set of functions, 2-2, 2-3 to 2-10, 2-11 to 2-18, 2-19 to 2-26, 2-27 to 2-34, 2-35 to 2-42, 2-43 to 2-50 execl function, 2-3 to 2-10 execle function, 2-11 to 2-18 execlp function, 2-19 to 2-26 execv function, 2-27 to 2-34 execve function, 2-35 to 2-42 execvp function, 2-43 to 2-50 _exit function, 2-51 to 2-52 F fast mutex, 5-86 fchmod function, 3-2 to 3-5 fchown function fcntl function, 3-9 to 3-15
Index closing, 1-26, 7-97 control operations, 1-42, 1-44, 3-9, 7-106, 7-112 controlling a device file, 3-110 core memory image, 11-3 cpio, 11-4 creating, 1-32, 5-4 creating a directory, 4-38 creating a FIFO, 4-38 creating a link for, 4-15 creating a pipe, 5-14 creating a regular file, 4-38 creating a special file, 4-38 creation mask, 9-4 descriptors.
OSS System Calls Reference Manual fstatvfs function, 3-30 to 3-37 fsync function, 3-38 to 3-39 ftruncate function, 3-40 to 3-41 function, 3-49 G gamma_r function, 3-42 to 3-43 get fileset information, 3-30, 7-379 getegid function, 3-44 geteuid function, 3-45 getgid function, 3-46 getgrent_r function, 3-47 to 3-48 getgrgid_r function, 3-49 to 3-50 getgrnam_r function, 3-51 to 3-52 getgroups function, 3-53 gethostbyaddr_r function, 3-54 to 3-55 gethostbyname_r function, 3-56 to 3-57 gethostent_r function, 3-
Index ioctl function, 3-112 kill function, 4-2 lchmod function, 4-7 lchown function, 4-10 link function, 4-16 lstat function, 4-32 message queue, 4-44, 4-47, 4-50, 4-53 mkdir function, 4-35 mknod function, 4-40 msgget function, 4-44, 4-47 msgrcv function, 4-50 msgsnd function, 4-53 nice function, 5-3 open function, 5-9 pipe function, 5-14 readlink function, 6-9 rename function, 6-30 rename_oss function, 6-27, 6-30 rmdir function, 6-36 select function, 7-7 semaphores, 7-17 semctl function, 7-13 semget functi
OSS System Calls Reference Manual H L hexadecimal ASCII character set, 12-2 hierarchy, file system, 12-36 to 12-37 host, returning name of current, 3-60 host entry returning by address, 3-54 returning by name, 3-56 hostname, returning for current host, 3-60 hosts name files searching by address, 3-54 searching by name, 3-56 lchmod function, 4-5 to 4-8 lchown function, 4-9 to 4-12 lgamma_r function, 4-13 to 4-14 limits header file, 11-10 to 11-16 link creating, 4-15 removing, 9-7 symbolic.
Index examining, 7-70 math header file, 11-17 memory image file, 11-3 message queue after disk process failures, 4-47 after processor failures, 4-47 cleaning up identifiers, 4-47 creating, 4-46 obtaining key for, 4-47 performing control operations on, 4-43 receiving a message from, 4-49 removing, 4-43 returning the identifier for, 4-46 sending a message to, 4-52 uniqueness of identifiers, 4-47 use between environments, 4-44, 4-47, 4-50, 4-53 messages receiving from a message queue, 4-49 receiving from conne
OSS System Calls Reference Manual 7-151, 7-209 output stream, writing word to, 7-234 to 7-235 owner ID, changing for a file, 1-19, 3-6, 4-9 P parameters, formatting for output, 7-325, 7-329 parent OSS process ID, returning, 3-74 pathname, 12-29 to 12-35 peer address, returning for a socket, 3-69 peer name, returning for a socket, 3-69 permission, changing for a file, 1-15, 3-2, 4-5 pipe function, 5-14 to 5-15 pipes creating, 5-14 propagating open, 8-4, 8-19, 8-38, 8-43, 8-59 POSIX-defined minimum values, 1
Index waiting for caught signals, 10-2 waiting for child process to stop, 10-7 process attributes default Guardian, 8-6, 8-21, 8-32, 8-46, 8-62 Guardian, 2-6, 2-14, 2-22, 2-30, 2-38, 2-46, 3-17 OSS, 2-5, 2-14, 2-22, 2-29, 2-38, 2-46, 3-16, 8-6, 8-20, 8-31, 8-45, 8-61 setting Guardian, 8-8, 8-22, 8-33, 8-47, 8-64 process deletion message, Guardian, 4-3 process group getting scheduling priority, 3-75 specifying, 8-44, 8-61 process ID, OSS, returning, 3-73, 3-74 process image identifying file, 2-3, 2-11, 2-19,
OSS System Calls Reference Manual pthread_delay_np function, 5-58 pthread_detach function, 5-59 pthread_equal function, 5-60 pthread_exit function, 5-61 pthread_getattr_np function, 5-63 pthread_getconcurrency function, 5-64 pthread_getschedparam function, 5-65 pthread_getspecific function, 5-67 pthread_get_expiration_np function, 5-62 pthread_join function, 5-68 pthread_key_create function, 5-70 pthread_key_delete function, 5-72 pthread_kill function, 5-73 pthread_lock_global_np function, 5-75 pthread_mute
Index performing control operations on, 7-11 performing operations on, 7-19 propagating to child process, 7-17, 8-38, 8-44, 8-60 propagating to new process, 2-5, 2-13, 2-21, 2-29, 2-37, 2-45, 8-5, 8-19 returning ID, 7-16 semaphores performing control operations on, 7-11 performing operations on, 7-19 semctl function, 7-11 to 7-15 semget function, 7-16 to 7-18 semop function, 7-19 to 7-22 send function, 7-23 to 7-25 sendmsg function, 7-26 to 7-29 sendto function, 7-30 to 7-33 service entry returning by name,
OSS System Calls Reference Manual TERM, 12-16 TERMCAP, 12-16 TERMINFO, 12-16 TERMPATH, 12-16 TMOUT, 12-17 TMPDIR, 12-17 TZ, 12-17 USER, 12-19 UTILSGE, 12-19 VISUAL, 12-19 ZCPU, 12-19 shmat function, 7-50 to 7-52 shmctl function, 7-53 to 7-55 shmdt function, 7-56 to 7-57 shmget function, 7-58 to 7-62 shutdown function, 7-63 to 7-64 sigaction function, 7-65 to 7-68 signal action, 7-65 to 7-68 signal file, 11-28 to 11-34 signal mask changing, 7-70, 7-72 examining, 7-70 signals blocked, 7-69, 7-70 blocking, 7-6
Index sending messages to unconnected, 7-30, 7-297 sending messages using a message structure, 7-26, 7-291 setting options, 7-42 setting transport-provider process name, 7-86 socket function, 7-76 to 7-79 socket pair, creating, 7-80 socketpair function, 7-80 to 7-83 socket_transport_name_get function, 7-84 to 7-85 socket_transport_name_set function, 7-86 to 7-87 special file, creating, 4-38 spthread.
OSS System Calls Reference Manual spt_putsx function, 7-225 to 7-226 spt_putw function, 7-227 spt_putwc function, 7-228 spt_putwchar function, 7-229 spt_putwcharx function, 7-230 to 7-231 spt_putwcx function, 7-232 to 7-233 spt_putwx function, 7-234 to 7-235 spt_read function, 7-236 SPT_READLOCKX function, 7-237 SPT_READUPDATELOCKX function, 7-240 SPT_READUPDATEX function, 7-243 spt_readv function, 7-246 spt_readvx function, 7-247 to 7-251 spt_readx function, 7-258 to 7-261 SPT_READX function, 7-252 spt_REC
Index spt_writev function, 7-349 spt_writevx function, 7-350 to 7-355 spt_writex function, 7-363 to 7-368 SPT_WRITEX function, 7-356 standard IO functions, 7-161, 7-218, 7-221 Standard POSIX threads, 5-16, 5-19, 5-21, 5-22, 5-23, 5-25, 5-28, 5-30, 5-32, 5-34, 5-37, 5-38, 5-40, 5-41, 5-43, 5-58, 5-59, 5-60, 5-61, 5-62, 5-64, 5-65, 5-67, 5-68, 5-75, 5-76, 5-77, 5-81, 5-82, 5-84, 5-88, 5-90, 5-92, 5-94, 5-95, 5-97, 5-98, 5-100, 5-101, 7-2, 7-3 standard POSIX threads, 7-67 Standard POSIX threads, 7-88, 7-92, 7-
OSS System Calls Reference Manual signaling, 5-73 SPT_ FILE_CLOSE_ function, 7-133 spt_acceptx function, 7-89 SPT_CANCEL function, 7-94 spt_closex function, 7-97 spt_connectx function, 7-100 SPT_CONTROL function, 7-104 spt_dup2x function, 7-106 spt_fclosex function, 7-110 spt_fcntlx function, 7-112 spt_fflushx function, 7-122 spt_fgetcx function, 7-125 spt_fgetsx function, 7-128 spt_fgetwcx function, 7-131 SPT_FILE_OPEN_ function, 7-136 spt_fprintfx function, 7-151 spt_fputcx function, 7-161 spt_fputsx func
Index yielding the processor, 7-4 stat function, 7-369 to 7-378 status flags.
OSS System Calls Reference Manual FLT_MANT_DIG, 11-8 FLT_MAX, 11-8 FLT_MAX_10_EXP, 11-8 FLT_MAX_EXP, 11-8 FLT_MIN, 11-8 FLT_MIN_10_EXP, 11-8 FLT_MIN_EXP, 11-8 F_DUPFD, 3-9, 3-12, 7-112, 7-115 F_GETFD, 3-10, 3-12, 7-113, 7-115 F_GETFL, 3-10, 3-12, 7-113, 7-115 F_GETLK, 3-11, 3-12, 7-114, 7-115 F_GETOWN, 3-11, 3-12, 7-114, 7-115 F_SETFD, 3-10, 3-12, 7-113, 7-115 F_SETFL, 3-10, 3-12, 7-113, 7-115 F_SETLK, 3-11, 3-12, 7-114, 7-115 F_SETLKW, 3-11, 3-12, 7-114, 7-115 F_SETOWN, 3-11, 3-12, 7-114, 7-116 F_UNLCK, 3-
Index LLONG_BIT, 11-11 LLONG_MAX, 11-11 LLONG_MIN, 11-11 LONG_BIT, 11-11 LONG_MAX, 11-11 LONG_MIN, 11-11 MAXFLOAT, 11-17 MAX_CANON, 11-15 MAX_INPUT, 11-15 MB_LEN_MAX, 11-11 MSG_CTRUNC, 6-23, 7-271 MSG_DONTROUTE, 7-23, 7-26, 7-30, 7-291, 7-297, 7-301 MSG_OOB, 6-16, 6-19, 6-22, 6-23, 7-23, 7-26, 7-30, 7-266, 7-270, 7-271, 7-274, 7-291, 7-297, 7-301 MSG_PEEK, 6-16, 6-19, 6-22, 7-266, 7-270, 7-274 MSG_TRUNC, 6-23, 7-271 M_1_PI, 11-17 M_2_PI, 11-17 M_2_SQRTPI, 11-17 M_E, 11-17 M_LN10, 11-17 M_LN2, 11-17 M_LOG10E
OSS System Calls Reference Manual SIOCGIFDSTADDR, 3-111 SIOCGIFFLAGS, 3-111 SIOCGIFNETMASK, 3-111 SIOCGIFNUM, 3-110 SIOCSARP, 3-111 SIOCSIFADDR, 3-111 SIOCSIFBRDADDR, 3-111 SIOCSIFDSTADDR, 3-111 SIOCSIFFLAGS, 3-111 SIOCSIFNETMASK, 3-111 SOCK_DGRAM, 3-102 SOCK_MAXBUF, 11-15 SOCK_STREAM, 3-102 SOL_SOCKET, 3-99, 7-42 SO_ACCEPTCONN, 3-100 SO_BROADCAST, 3-101, 7-44 SO_DEBUG, 3-101, 7-44 SO_DONTROUTE, 3-101, 7-44 SO_ERROR, 3-101 SO_KEEPALIVE, 3-101, 7-45 SO_LINGER, 1-27, 3-101, 7-45 SO_OOBINLINE, 3-101, 7-45 SO_R
Index TCOOFF, 11-63 TCOON, 11-63 TCSADRAIN, 11-63 TCSAFLUSH, 11-63 TCSANOW, 11-63 TIOCGWINSZ, 3-111 TIOCSWINSZ, 3-112 TOSTOP, 11-62 TZNAME_MAX, 11-12 UCHAR_MAX, 11-12 UINT_MAX, 11-12 ULLONG_MAX, 11-12 ULONG_MAX, 11-12 USHRT_MAX, 11-12 VEOF, 11-62 VEOL, 11-62 VERASE, 11-62 VINTR, 11-62 VKILL, 11-62 VQUIT, 11-63 VSTART, 11-63 VSTOP, 11-63 VSUSP, 11-63 WNOHANG, 10-8 WORD_BIT, 11-12 WUNTRACED, 10-8 _POSIX2_BC_BASE_MAX, 11-14 _POSIX2_BC_DIM_MAX, 11-14 _POSIX2_BC_SCALE_MAX, 11-14 _POSIX2_BC_STRING_MAX, 11-14 _POS
OSS System Calls Reference Manual _TPC_BAD_OSS_OPTIONS, _TPC_HIGHPIN_OFF, 8-11, 12-45 8-25, 8-35, 8-50, _TPC_BAD_OUTPUT, 8-66 12-42, 12-45 _TPC_IGNORE_FORCEPIN_ATTR, _TPC_BAD_OUTPUT_LEN, 8-11, 8-25, 8-36, 12-42, 12-45 8-50, 8-66 _TPC_BAD_PARAM_REFERENCE, _TPC_INSPECT_NOSAVE, 12-40 8-12, 8-26, 8-36, _TPC_BAD_PARAM_VALUE, 8-51, 8-67 12-43 _TPC_INSPECT_SAVEABEND, _TPC_BAD_PARMLIST, 8-12, 8-26, 8-37, 12-42, 12-45 8-51, 8-67 _TPC_BAD_PFS_SIZE, _TPC_NAME_SUPPLIED, 12-45 8-10, 8-24, 8-35, _TPC_BAD_PIMFILE, 8-49, 8
Index temporary file, name, 8-72 termcap file, 11-46 to 11-58 terminal capability database, 11-46 terminal drivers, 11-65 terminal interface, 11-59, 11-65 terminal name, retrieving, 8-73 termios file, 11-59 to 11-64 text file, executing, 2-4, 2-12, 2-20, 2-28, 2-36, 2-44, 8-4, 8-18, 8-42, 8-58 time conversion functions, 1-8, 1-41, 3-108 to 3-109, 4-21 to 4-22 time units converting to other time units, 1-8, 1-41, 3-108, 4-21 converting to strings, 1-8, 1-41 storing for later processing, 1-8, 1-41, 3-108, 4-2