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.25 and H06.03 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-003 N/A July 2005
Contents _____________________________ What is New in This Manual . . . . . . . . . . . . . . . . . . . . xi . . . . . . . . . . . . . . . . . . . xi Changed Functions . . . . . . . . . . . . . . . . . . . xii . . . . . . . . . . . . . . xiii New Functions . Changes in Miscellaneous Topics Changes in Files . . . . . . . . . . . . . . . . . . . xiv General Changes . . . . . . . . . . . . . . .
OSS System Calls Reference Manual fcntl . . fork . . fstat . . fstatvfs . fsync . . ftruncate . getegid . geteuid . getgid . . getgroups gethostname getlogin . getpeername getpgid . getpgrp . getpid . . getppid . getpriority getsockname getsockopt gettimeofday getuid . . ioctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents pthread_attr_setstacksize . . pthread_cancel . . . . . pthread_cleanup_pop . . . pthread_cleanup_push . . . pthread_cond_broadcast . . pthread_cond_destroy . . . pthread_cond_init . . . . pthread_cond_signal . . . pthread_cond_signal_int_np . pthread_cond_timedwait . . pthread_cond_wait . . . . pthread_condattr_destroy . . pthread_condattr_init . . . pthread_create . . . . . pthread_delay_np . . . . pthread_detach . . . . . pthread_equal . . . . . pthread_exit . . . . . .
OSS System Calls Reference Manual rename . . . rename_guardian rename_oss . . rmdir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23 6-24 6-26 6-32 Section 7. System Functions (s and S) sched_get_priority_max . sched_get_priority_min . sched_yield . . . . . select . . . . . . . semctl . . . . . . semget . . . . . . semop . . . . . . . send . . . . . . . sendmsg . . . . . . sendto . . . . .
Contents spt_getc . . . . . . . . spt_getchar . . . . . . . spt_gets . . . . . . . . spt_getTMFConcurrentTransactions spt_getw . . . . . . . . spt_getwc . . . . . . . spt_getwchar . . . . . . spt_INITRECEIVE . . . . . spt_interrupt . . . . . . . spt_interruptTag . . . . . spt_OSSFileIOHandler_p . . . spt_printf . . . . . . . . spt_putc . . . . . . . . spt_putchar . . . . . . . spt_puts . . . . . . . . spt_putw . . . . . . . . spt_putwc . . . . . . . spt_putwchar . . . . . . spt_read . . . . . . . .
OSS System Calls Reference Manual symlink . . . . . . . . . . . SPT_ABORTTRANSACTION . . . . SPT_BEGINTRANSACTION . . . . SPT_ENDTRANSACTION . . . . . SPT_RESUMETRANSACTION . . . . SPT_SERVERCLASS_DIALOG_ABORT_ SPT_SERVERCLASS_DIALOG_BEGIN_ SPT_SERVERCLASS_DIALOG_END_ . SPT_SERVERCLASS_DIALOG_SEND_ . SPT_SERVERCLASS_SEND_ . . . . SPT_SERVERCLASS_SEND_INFO_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Permuted Index Index . 527186-003 . . . . . . . . . . . . . . . . . . . . . . . . . Pindex-1 . . . . . . . . . . . . . . . . . . . . . . .
OSS System Calls Reference Manual LIST OF TABLES Table 3−1. Ignored File Status Flags . . . . . . . . . . . . . . . . . 3-3 Table 3−2. Guardian File Type Mappings . . . . . . . . . . . . . . . . 3-20 Table 4−1. Guardian File Type Mappings . . . . . . . . . . . . . . . . 4-19 Table 7−1. Guardian File Type Mappings . . . . . . . . . . . . . . . . 7-165 Table 11−1. cpio Archive File Header Format . . . . . . . . . . . . . .
What is New in This Manual This section describes changes made to the Open System Services System Calls Reference Manual since the 522693-005 edition.
OSS System Calls Reference Manual spt_regPathsendFile(2) spt_regPathsendTagHandler(2) spt_setTMFConcurrentTransactions(2) spt_sleep(2) spt_unregPathsendTagHandler(2) spt_usleep(2) Changed Functions Information was revised on the following reference pages: chmod(2) Added trust bit to possible values for file mode. execl(2) Added security group list information to resolve Genesis Change Request 10-050106-4114. Added information for SIG_ABORT and SIG_DEBUG.
What is New in This Manual semctl(2) Added information about waking processes to resolve Genesis Change Request 10-040510-8757. sigaction(2) Added information for SIG_ABORT and SIG_DEBUG. Added information for the SIGUNCP signal. sigsuspend(2) Added a pointer to the signal(4) reference page. stat(2) Added trust bit to possible values for file mode. tdm_execve(2) Removed pe_heap_max discussion detail and added pointer to C/C++ Programmer’s Guide.
OSS System Calls Reference Manual process_extension_results(5) Added pointer to specific table in Guardian Procedure Calls Reference Manual. Changes in Files Information was revised on the following reference pages: signal(4) Information was added for the SIGUNCP signal. spthread.h(4) Information was added for the new function calls. General Changes Library residence information was added to each reference page.
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.
bind(2) OSS System Calls Reference Manual 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.
System Functions (a - d) bind(2) [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.
bind(2) OSS System Calls Reference Manual • 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.
System Functions (a - d) chdir(2) 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.
chdir(2) OSS System Calls Reference Manual 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.
System Functions (a - d) chdir(2) [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.
chmod(2) OSS System Calls Reference Manual 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.
System Functions (a - d) chmod(2) 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).
chmod(2) OSS System Calls Reference Manual Use on Guardian Objects Attempting to set the access permissions on a Guardian file (that is, a file in the /G file system) fails with errno set to [EINVAL].
System Functions (a - d) [ENOENT] [ENOROOT] chmod(2) One of these conditions exists: • The named file does not exist, or the specified name is 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 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.
chown(2) OSS System Calls Reference Manual 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.
System Functions (a - d) chown(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 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.
chown(2) OSS System Calls Reference Manual [ENOROOT] • 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.
System Functions (a - d) chown(2) HP extensions to the XPG4 Version 2 specification are: • 527186-003 The errno values [EFAULT], [EFSBAD], [EIO], [ENOROOT], [ENXIO], and [EOSSNOTRUNNING] can be returned.
chroot(2) OSS System Calls Reference Manual 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.
System Functions (a - d) chroot(2) 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.
chroot(2) OSS System Calls Reference Manual [ENOENT] 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.
System Functions (a - d) close(2) 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.
close(2) OSS System Calls Reference Manual 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.
System Functions (a - d) connect(2) 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.
connect(2) OSS System Calls Reference Manual 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.
System Functions (a - d) [EFAULT] connect(2) 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.
connect(2) OSS System Calls Reference Manual • 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.
System Functions (a - d) creat(2) 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.
creat(2) OSS System Calls Reference Manual • 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.
System Functions (a - d) creat(2) 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.
creat(2) OSS System Calls Reference Manual 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.
System Functions (a - d) creat(2) [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.
creat(2) OSS System Calls Reference Manual • 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.
System Functions (a - d) creat(2) • 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: 527186-003 • Opening Guardian files (that is, files in the /G file system) is supported, as described under Opening Guardian Files in DESCRIPTION.
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.
fcntl(2) OSS System Calls Reference Manual 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.
System Functions (f - i) F_GETFD fcntl(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.
fcntl(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 (f - i) fcntl(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.
fcntl(2) OSS System Calls Reference Manual 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.
System Functions (f - i) [EIO] fcntl(2) • 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.
fcntl(2) OSS System Calls Reference Manual 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.
System Functions (f - i) fork(2) 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.
fork(2) OSS System Calls Reference Manual • 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.
System Functions (f - i) fork(2) • 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.
fork(2) OSS System Calls Reference Manual 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.
System Functions (f - i) fork(2) The following are HP extensions to the XPG4 Version 2 specification: • 527186-003 The [EFAULT], [ENOTOSS], and [EUNKNOWN] error values are HP extensions.
fstat(2) OSS System Calls Reference Manual 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.
System Functions (f - i) fstat(2) 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).
fstat(2) OSS System Calls Reference Manual from the inode for the socket are returned for the permission bits. The access flags are also returned from the inode. S_IRWXG Group class S_IRWXO Other class S_IRWXU Owner class S_ISGID Set group ID on execution S_ISUID Set user ID on execution S_ISVTX Sticky bit; used only for directories (not ORed for files in /G, the Guardian file system) S_NONSTOP Regular file in the OSS file system protected by disk process checkpointing.
System Functions (f - i) st_uid fstat(2) For Contains Regular file Directory FIFO Pipe AF_INET or AF_INET6 socket 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 -1 0 (zero) 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.
fstat(2) OSS System Calls Reference Manual st_size For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty Undefined Undefined Undefined 0 (zero) 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.
System Functions (f - i) fstat(2) For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket Time of the last data modification Time of the last modification Time of the last data modification Value maintained in the socket data structure Value retrieved from the inode Current time Composite value of the times of all openers of the file AF_UNIX socket /dev/null /dev/tty For the /E entry of the local node, the value is the time of the most recent mounting of the root fileset.
fstat(2) OSS System Calls Reference Manual calls. The st_ctime and st_atime fields for Guardian regular disk files (except for EDIT files) are 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. The mapping between Guardian files and their corresponding file types described in the st_mode field is listed next: Table 3−2.
System Functions (f - i) fstat(2) 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 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.
fstat(2) OSS System Calls Reference Manual 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.
System Functions (f - i) fstatvfs(2) 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.
fstatvfs(2) f_frsize f_blocks OSS System Calls Reference Manual 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 fil
System Functions (f - i) fstatvfs(2) 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.
fstatvfs(2) f_ffree OSS System Calls Reference Manual 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.
System Functions (f - i) f_fsid fstatvfs(2) 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.
fstatvfs(2) OSS System Calls Reference Manual 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.
System Functions (f - i) f_bminavail f_bmaxavail fstatvfs(2) 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. 0 0 0 Number of blocks free on the disk volume with the most space remaining: For Contains Regular file Directory FIFO /dev/null Object in /G /G Terminal device file /E Number of blocks.
fstatvfs(2) OSS System Calls Reference Manual [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.
System Functions (f - i) fsync(2) 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.
fsync(2) OSS System Calls Reference Manual [ENXIO] 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.
System Functions (f - i) ftruncate(2) 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.
ftruncate(2) OSS System Calls Reference Manual • [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.
System Functions (f - i) getegid(2) 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.
geteuid(2) OSS System Calls Reference Manual 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.
System Functions (f - i) getgid(2) 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.
getgroups(2) OSS System Calls Reference Manual 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.
System Functions (f - i) gethostname(2) 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.
getlogin(2) OSS System Calls Reference Manual 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.
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−48 The function can return the errno value [ENOTOSS].
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−56 • 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.
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. request Specifies the function to be performed for 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) 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) 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_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 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_size lstat(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 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 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.
System Functions (k - m) lstat(2) The st_ctime and st_atime fields for Guardian regular disk files (except for EDIT files) are 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 lstat( ) function call fails. The value -1 is returned and errno is set to [ENOENT].
lstat(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 (k - m) lstat(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 path parameter The pathconf( ) function can be called to obtain the applicable limits. [ENOENT] One of the following conditions exists: • The file specified by the path parameter does not exist. • path points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename.
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 • 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 mkdir( ) function returns the value 0 (zero).
System Functions (k - m) mkdir(2) • [ENOROOT] 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. The OSS name server for the fileset might have failed.
mkdir(2) 4−26 OSS System Calls Reference Manual Hewlett-Packard Company 527186-003
System Functions (k - m) mknod(2) 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.
mknod(2) OSS System Calls Reference Manual 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
System Functions (k - m) mknod(2) • A group ID set to the effective group ID of the process or to the group ID of the parent directory of the file. • Access permission and attribute bits set according to the value of the mode parameter, as modified by the settings of the file mode creation mask for the process. Access permission and attribute bits are cleared when the corresponding file mode creation mask bits are set. (See the umask(2) reference page.
mknod(2) OSS System Calls Reference Manual NOTES Use the mkfifo( ) function instead of the mknod( ) function to create a FIFO when you need to port an application to a UNIX system that does not support XPG4 Version 2. 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.
System Functions (k - m) mknod(2) • The specified pathname is an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The path parameter includes 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. [ENOROOT] The root fileset (fileset 0) is not in the STARTED state.
mknod(2) OSS System Calls Reference Manual • 4−32 Behavior is defined when values for the device parameter other than 0 (zero) are specified.
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-003 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-003 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.
read(2) OSS System Calls Reference Manual 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.
System Functions (r) read(2) • 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].
read(2) OSS System Calls Reference Manual ERRORS If any of these conditions occurs, the read( ) function sets errno to the corresponding value: [EAGAIN] 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.
System Functions (r) read(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 using the file descriptor. The file descriptor specified by the filedes parameter can only be closed. For all other error conditions, errno is set to the appropriate Guardian file-system error number.
readlink(2) OSS System Calls Reference Manual 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.
System Functions (r) readlink(2) • 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).
readlink(2) OSS System Calls Reference Manual • 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).
System Functions (r) readv(2) 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
readv(2) OSS System Calls Reference Manual — 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.
System Functions (r) readv(2) 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.
readv(2) OSS System Calls Reference Manual [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.
System Functions (r) recv(2) 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. length Specifies the length in bytes of the buffer pointed to by the buffer parameter.
recv(2) OSS System Calls Reference Manual 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.
System Functions (r) 527186-003 recv(2) Hewlett-Packard Company 6−15
recvfrom(2) OSS System Calls Reference Manual 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.
System Functions (r) recvfrom(2) 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].
recvfrom(2) OSS System Calls Reference Manual [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.
System Functions (r) recvmsg(2) 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. message Points to a msghdr structure containing both the buffer to store the source address and the buffers for the incoming message.
recvmsg(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 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].
System Functions (r) recvmsg(2) [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.
recvmsg(2) OSS System Calls Reference Manual 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: 6−22 • The errno value [ECONNRESET] can be returned when the transport-provider process is not available. • The errno value [EMFILE] can be returned.
System Functions (r) rename(2) 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( ).
rename_guardian(2) OSS System Calls Reference Manual 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
System Functions (r) rename_guardian(2) 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.
rename_oss(2) OSS System Calls Reference Manual 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
System Functions (r) rename_oss(2) 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.
rename_oss(2) OSS System Calls Reference Manual 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.
System Functions (r) rename_oss(2) — /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.
rename_oss(2) OSS System Calls Reference Manual [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.
System Functions (r) • rename_oss(2) 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.
rmdir(2) OSS System Calls Reference Manual 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).
System Functions (r) rmdir(2) 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.
rmdir(2) OSS System Calls Reference Manual [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.
System Functions (r) rmdir(2) 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 OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include
select(2) OSS System Calls Reference Manual completion of the call. fd Specifies a file descriptor. fdset Points to a file descriptor set. DESCRIPTION The select( ) function checks the status of objects identified by bit masks called file descriptor sets. Each file descriptor set consists of an array of bits whose relative position and state represent a file descriptor and the true or false status for the condition of its corresponding object.
System Functions (s and S) select(2) After a file descriptor set is created, it can be modified with these macros: FD_CLR(fd, &fdset) Clears the file descriptor bit specified by the fd parameter in the file descriptor set pointed to by the fdset parameter. FD_ISSET(fd, &fdset) Returns a nonzero value when the file descriptor bit specified by the fd parameter is set in the file descriptor set pointed to by the fdset parameter. Otherwise, the value 0 (zero) is returned.
select(2) OSS System Calls Reference Manual Specifying arbitrarily large values for the nfds parameter can cause the function to behave inefficiently. The time limit value specified by the timeout parameter has no effect on the operation of the alarm( ) or settimer( ) function. RETURN VALUES Upon successful completion, the select( ) function returns the number of ready objects represented by corresponding file descriptor bits in all the file descriptor sets.
System Functions (s and S) select(2) RELATED INFORMATION Functions: fcntl(2), read(2), write(2). STANDARDS CONFORMANCE The HP implementation does not support use of this function on terminal device files. HP extensions to the XPG4 Version 2 specification are: • The errno value [ENOTSUP] can be returned for a call that attempts to select a terminal device file. • The errno value [ENETDOWN] can be returned.
semctl(2) OSS System Calls Reference Manual 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.
System Functions (s and S) *array semctl(2) 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.
semctl(2) SETALL OSS System Calls Reference Manual 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.
System Functions (s and S) semctl(2) 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.
semctl(2) OSS System Calls Reference Manual 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: • 7−14 The errno values [EFAULT] and [ENOTOSS] can be returned.
System Functions (s and S) semget(2) 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. The IPC_PRIVATE key can be used to ensure the return of a new (unused) semaphore set ID in the semaphore set table.
semget(2) OSS System Calls Reference Manual • 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.
System Functions (s and S) semget(2) [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).
semop(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sem_flg semop(2) 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.
semop(2) OSS System Calls Reference Manual 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.
System Functions (s and S) [EINVAL] [ENOSPC] semop(2) 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. • The system-defined limit on the number of SEM_UNDO structures for a single processor would be exceeded.
send(2) OSS System Calls Reference Manual 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.
System Functions (s and S) send(2) 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.
send(2) OSS System Calls Reference Manual [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].
System Functions (s and S) sendmsg(2) 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.
sendmsg(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sendmsg(2) [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.
sendmsg(2) OSS System Calls Reference Manual [ENOMEM] 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.
System Functions (s and S) sendto(2) 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.
sendto(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sendto(2) [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. [EMSGSIZE] The message is too large to be sent all at once, as required by the socket.
sendto(2) OSS System Calls Reference Manual [EPIPE] 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.
System Functions (s and S) setgid(2) 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.
setpgid(2) OSS System Calls Reference Manual 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.
System Functions (s and S) [EPERM] [ESRCH] setpgid(2) 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.
setsid(2) OSS System Calls Reference Manual 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.
System Functions (s and S) setsockopt(2) 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
setsockopt(2) OSS System Calls Reference Manual 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.
System Functions (s and S) setsockopt(2) 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].
setsockopt(2) OSS System Calls Reference Manual 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.
System Functions (s and S) setsockopt(2) 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.
setsockopt(2) OSS System Calls Reference Manual 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.
System Functions (s and S) setsockopt(2) [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.
setuid(2) OSS System Calls Reference Manual 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.
System Functions (s and S) shmat(2) 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.
shmat(2) OSS System Calls Reference Manual 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.
System Functions (s and S) [EINVAL] shmat(2) 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.
shmctl(2) OSS System Calls Reference Manual 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.
System Functions (s and S) shmctl(2) 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.
shmctl(2) OSS System Calls Reference Manual • [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.
System Functions (s and S) shmdt(2) 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.
shmdt(2) OSS System Calls Reference Manual 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.
System Functions (s and S) shmget(2) 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.
shmget(2) OSS System Calls Reference Manual 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.
System Functions (s and S) • shmget(2) 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. This key is then passed to the shmget( ) function, which returns a shared memory identifier.
shmget(2) OSS System Calls Reference Manual 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.
System Functions (s and S) shmget(2) 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: • 527186-003 The errno value [ENOTOSS] can be returned.
shutdown(2) OSS System Calls Reference Manual 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.
System Functions (s and S) [ENOMEM] shutdown(2) 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].
sigaction(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sigaction(2) 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.
sigaction(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sigaction(2) 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.
sigpending(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sigprocmask(2) NAME sigprocmask - Changes or examines the signal mask LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include
sigprocmask(2) OSS System Calls Reference Manual 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.
System Functions (s and S) sigsuspend(2) 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.
sigsuspend(2) OSS System Calls Reference Manual 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: 7−68 • 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.
System Functions (s and S) sockatmark(2) 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.
sockatmark(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: recv(2), recvmsg(2), socket(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 specification.
System Functions (s and S) socket(2) 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.
socket(2) OSS System Calls Reference Manual 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.
System Functions (s and S) • socket(2) 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 by def
socket(2) OSS System Calls Reference Manual [ENOMEM] 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.
System Functions (s and S) socketpair(2) 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.
socketpair(2) OSS System Calls Reference Manual 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.
System Functions (s and S) socketpair(2) 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.
socketpair(2) OSS System Calls Reference Manual 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: • 7−78 The errno values [ENOENT] and [ETANOTRUNNING] can be returned.
System Functions (s and S) socket_transport_name_get(2) 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.
socket_transport_name_get(2) OSS System Calls Reference Manual 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.
System Functions (s and S) socket_transport_name_set(2) 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.
socket_transport_name_set(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_accept(2) 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. The socket must be nonblocking for this function to be thread aware.
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_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_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_fclose(2) OSS System Calls Reference Manual 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.
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_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_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_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_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_fork(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_fprintf(2) 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.
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_fputs(2) 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.
spt_fputwc(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_fread(2) 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.
spt_fwrite(2) OSS System Calls Reference Manual 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.
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_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_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_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_OSSFileIOHandler_p(2) OSS System Calls Reference Manual 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
System Functions (s and S) spt_printf(2) 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.
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_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_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_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_readv(2) 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. The file descriptor must be nonblocking for this function to be thread-aware.
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_recvmsg(2) OSS System Calls Reference Manual 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.
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 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. DESCRIPTION This is a thread-aware version of the select( ) function.
spt_send(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_sendmsg(2) 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.
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_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 either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware verison 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_unregFile(2) 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.
spt_unregOSSFileIOHandler(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_unregPathsendTagHandler(2) 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.
spt_usleep(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_vfprintf(2) 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.
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_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_wakeup(2) OSS System Calls Reference Manual 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
System Functions (s and S) spt_write(2) 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.
spt_writev(2) OSS System Calls Reference Manual 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.
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 S_TRUSTSHARED Indicates that the file does not contain code for an uncooperative process or code to examine or modify I/O buffers. This flag suppresses operating system protection of the buffers regardless of whether the memory segment containing the buffers is shared. This flag applies only to loadfiles for a process and can be set only by a user with appropriate privileges (the super ID).
System Functions (s and S) st_rdev stat(2) For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Group ID of the file group Group ID of the file group Group ID of the file group Group ID of the creator of the socket file Group ID of the super ID Group ID of the super ID Remote device ID. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
stat(2) OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Time of the last access Time of the last access Time of the last access 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_mtime Modification time. Values for OSS objects are listed next.
System Functions (s and S) stat(2) Use on Guardian Objects The st_dev and st_ino fields of the stat structure do not uniquely identify Guardian files (files in /G). The st_dev field is unique for /G, for each disk volume and for each Telserv process (or other process of subdevice type 30), because each of these is a separate fileset. The S_ISGUARDIANOBJECT macro can indicate whether an object is a Guardian object when the st_dev field is passed to the macro.
stat(2) OSS System Calls Reference Manual Guardian permissions are mapped as listed: • A Guardian network or any user permission is mapped to an OSS other permission. • A Guardian community or group user permission is mapped to an OSS group permission. • A Guardian user or owner permission is mapped to an OSS owner permission. • A Guardian super ID permission is an OSS super ID permission. • Guardian read permission is mapped to OSS read permission.
System Functions (s and S) stat(2) ERRORS If any of these conditions occurs, the stat( ) function sets errno to the corresponding value: [EACCES] Search permission is denied for a component of the pathname pointed to by the path parameter. [EFAULT] Either the buffer parameter or the path 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.
stat(2) OSS System Calls Reference Manual [ENOTDIR] A component of the pathname specified by the path parameter is not a directory. [ENXIO] 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.
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.
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.
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-003 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 Write requests to a pipe or a 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 write( ) request appends to the end of the pipe. • 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.
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: • Return the errno value [EWOULDBLOCK] for a call on a socket that does not have O_NONBLOCK set and does not have space available to receive data • Generate the SIGXFSZ signal The POSIX standards leave some features to the implementing vendor to define.
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. If the O_SYNC status flag of the file is set and filedes refers to a regular file, a successful writev( ) call does not return until the data is delivered to the underlying hardware (as described in the open(2) reference page).
writev(2) OSS System Calls Reference Manual Upon successful completion, the writev( ) function marks the st_ctime and st_mtime fields of the file for update and clears the set-user-ID and set-group-ID attributes if the file is a regular file. The fcntl( ) function provides more information about record locks. If it is interrupted by a signal before it writes any data, the writev( ) function returns the value -1 with errno set to [EINTR].
System Functions (w) [EIO] writev(2) • One of the iov_len values in the iov array was negative or overflowed a data item of type ssize_t. • The sum of the iov_len values in the iov array overflowed an integer. 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.
writev(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 use of the file descriptor. The file descriptor specified by the filedes parameter can only be closed.
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.
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−40 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-003 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−42 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−56 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.
Permuted Index _____________________________ spt_fputwc: Thread-aware fputwc( required by spt_regFileIOHandler( spt_fputc: Thread-aware fputc( required by spt_regTimerHandler( 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-aware fgets( Initiates thread-aware fgetwc( Initiates thread-aware
OSS System Calls Reference Manual chmod: Changes file access: Determines the signal sigaction: Specifies the existing file/ link: Creates an specified/ /Obtains the stackbase /a shared memory segment to the but does not wait if the mutex is synchronous/ select: Selects (library) file format cpio: Describes the extended cpio tar: Describes the extended tar ar: Describes the /a file using a pathname, a set of /a file using a pathname, a set of /a file using a filename, a set of /a file using a pathname, an /a
Permuted Index mutex type attribute of a mutex scheduling attribute of a thread scheduling attribute of a thread policy attribute of a thread policy attribute of a thread policy attribute of a thread policy attribute of a thread /Writes modified data and file /Interrupts all threads /Interrupts thread spt_wakeup: Wakes up a thread spt_awaitio: /socket connections and limits the SPT_ABORTTRANSACTION: Aborts and bind: sigsuspend: Changes the set of getsockname: Gets the locally /variable to be signaled or var
OSS System Calls Reference Manual working directory calling thread’s process forks a waitpid: Waits for a specific wait: Waits for any permissions group IDs of a file root directory process in a Pathway server SPT_SERVERCLASS_DIALOG_END_: calling/ /(Macro) Removes the executed/ /(Macro) Establishes a /routine from the calling thread’s spt_close: Initiates thread-aware close: pipe: Creates an interprocess socket: Creates an endpoint for pthread_equal: the terminal interface for POSIX /Gets level of /Sets lev
Permuted Index 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 an existing file on the /a transaction associated with the transaction associated with the a transaction associated with the transaction associa
OSS System Calls Reference Manual pthread_mutex_destroy: pthread_mutexattr_destroy: object pthread_attr_destroy: shmdt: attributes object /Obtains the attributes object /Sets the file access: the out-of-band mark sockatmark: ioctl: Controls /Aborts the specified /up resources for the specified message of the/ /Initiates the the/ /a send within the specified /sends the first message of the directories dir: Describes the format of mkdir: Creates a rename: Renames a file or rmdir: Removes a Changes the current
Permuted Index a set of argument/ execle: an argv array, and/ execv: 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
OSS System Calls Reference Manual select: Selects among a set of functions that execute a or rewrites an existing creates a regular/ open: Opens a Describes the archive (library) the extended cpio archive the extended tar archive writev: Writes to a information about an open fileset information for an open rename_guardian: Renames a /or writing, creates a regular creat: Creates a regular readv: Reads from a ftruncate: Changes about a symbolic link or any Sets and gets the value of the filename: Explain OSS
Permuted Index information for an open file fstatvfs: Gets fileset ....................................................... fstatvfs(2) file attributes to permanent/ fsync: Writes modified data and ................................... fsync(2) ftruncate: Changes file length ....................................... ftruncate(2) spt_fputc: Thread-aware fputc( ) function ..........................................................................
OSS System Calls Reference Manual ID for a specified OSS process getpgid: Gets the process group ................................... getpgid(2) ID of the calling process getpgrp: Gets the process group ................................... getpgrp(2) getpid: Gets the OSS process ID .................................. getpid(2) process ID getppid: Gets the parent OSS ....................................... getppid(2) scheduling priority getpriority: Gets the OSS process ................................
Permuted Index Executes a new process with Executes a new process with getegid: Gets the effective group getgid: Gets the real group getpid: Gets the OSS process 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 t
OSS System Calls Reference Manual function spt_putc: function spt_putchar: function.
Permuted Index getlogin: Gets or write operation a symbolic link or any file pthread_cleanup_push: pthread_cleanup_pop: /Registers the file descriptor to tfile for concurrent transaction file number as one that the user a socket is at the out-of-band deletion pthread_detach: the calling thread’s signal Changes or examines the signal value of the file mode creation constants math: Specifies the policy /Returns the shmctl: Performs shared core: Is a file containing a saveabend: Is a file containing a shmdt: D
OSS System Calls Reference Manual getlogin: Gets login Gets the locally bound gethostname: Gets the getpeername: Gets the process /Gets the process /Sets the bind: Binds a Explain OSS file system file Explains OSS file system path priority of the calling process spt_regFile: Registers the file /Unregisters a Guardian file transactions being used /Gets the transactions /Sets the of the thread for a specified Registers the file Registers the Pathsend file /Destroys a mutex attributes the specified thread attr
Permuted Index msgctl: Performs message control semop: Performs semaphore system limits for floating-point Performs semaphore control Performs shared memory control down socket send and receive cleanup-handler stack and getsockopt: Gets socket setsockopt: Sets socket /Creates a regular file in the creates a regular file in the a directory entry from the /Unregisters an filename: Explain hier: Explains the pathname: Explains process group ID for a specified getpid: Gets the getppid: Gets the parent getpriori
OSS System Calls Reference Manual /Returns the minimum Gets the OSS process scheduling nice: Changes the scheduling Initiates thread-aware REPLYX _exit: Terminates a fork: Creates a new /associated with the current /associated with the current /associated with the current /associated with the current thread’s process forks a child priority of the calling /Contains the status of a called when the calling thread’s effective user ID of the current the group list of the current process group ID of the calling g
Permuted Index Initializes a condition variable/ all threads that are waiting on/ condition variable condition variable least one thread that is waiting/ Unblocks one thread that is/ thread to wait either for a/ thread to wait for the specified/ execution of a thread object for deletion thread identifiers calling thread attribute object for a thread level of concurrency Calculates an absolute/ the current scheduling policy/ thread-specific data associated/ thread to wait for the/ unique thread-specific data
OSS System Calls Reference Manual thread-aware function for reading Shuts down socket send and connected socket recv: queue msgrcv: recvfrom: using a message/ recvmsg: process/ /Sends a message to and spt_recv: Initiates thread-aware connected socket /Initiates thread-aware from a socket a socket using a message/ Initiates thread-aware callback/ spt_regTimerHandler: spt_INITRECEIVE: manage/ spt_regOSSFileIOHandler: spt_regFile: spt_regFileIOHandler: number spt_regPathsendFile: spt_regPathsendTagHandler: env
Permuted Index attributes/ /Sets the inherit /the current scheduling policy and /Sets the scheduling policy and scheduling policy/ /Obtains the scheduling policy/ /Sets the parameters/ /Obtains the current pthread_setschedparam: Sets the /the scheduling parameters of the thread attributes/ /Obtains the /the scheduling parameters of the thread attributes/ /Sets the the maximum priority for a the minimum priority for a getpriority: Gets the OSS process calling/ nice: Changes the willingness to yield the/ shmd
OSS System Calls Reference Manual ulimit: file mode creation mask umask: times utime: write operation lseek: spt_setOSSFileIOHandler: pthread_setconcurrency: setsockopt: pthread_setcancelstate: pthread_setcanceltype: a/ pthread_attr_setdetachstate: process setgid: 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: the/ pthread_a
Permuted Index backlog of/ listen: Listens for communications Gets the name of the peer Gets the locally bound name of a sockatmark: Determines whether a getsockopt: Gets setsockopt: Sets a message from a connected Receives a message from a operations shutdown: Shuts down Sends a message on a connected /Receives a message from a sendmsg: Sends a message on a connected sockets Creates a pair of connected the name of the/ the name of the/ /memory segment to the address assigns a pathname to a character termin
OSS System Calls Reference Manual getw( ) function getwc( ) function thread-aware getwchar( )/ file $RECEIVE filename threads awaiting input or output thread awaiting tagged I/O callback type required by the/ thread-aware printf( ) function putc( ) function thread-aware putchar( ) function puts( ) function.
Permuted Index a file Increments and returns a attempt /Contains the using a pathname for a specific child process to and file attributes to permanent /a pathname, a set of argument a pathname, a set of argument a filename, a set of argument from a socket using a message on a socket using a message for a specified time/ spt_sleep: for a specified/ spt_usleep: readlink: Reads the value of a Provides information about a symlink: Creates a to a file among file descriptors for Initiates thread-aware filename: E
OSS System Calls Reference Manual scheduling policy attribute of a scheduling policy attribute of a the detachstate attribute of a inherit scheduling attribute of a scheduling policy attribute of a inherit scheduling attribute of a scheduling policy attribute of a spt_interruptTag: Interrupts spt_wakeup: Wakes up a to be executed once by a single to wait for the termination of a and scheduling parameters of a /Suspends execution of the /Suspends execution of the thread pthread_self: Obtains the pthread_equa
Permuted Index spt_recvmsg: Initiates call spt_REPLYX: Initiates spt_select: Initiates spt_send: Initiates spt_sendmsg: Initiates spt_sendto: Initiates spt_system: Initiates spt_vfprintf: Initiates spt_vprintf: Initiates spt_waitpid: Initiates spt_write: Initiates spt_writev: Initiate spt_interrupt: Interrupts all /Sets the calling /Sets the calling and/ /routine from the calling /Unlocks the /to be called when the calling Locks the global mutex for /Examines or changes the calling specified condition/ /Unb
OSS System Calls Reference Manual environ: Contains the setuid: Sets the geteuid: Gets the effective getuid: Gets the the real file number as one that the /Registers the /Unregisters the spt_regTimerHandler: Registers a argument/ execlp: Executes a file and/ execvp: Executes a file /Receives a message from a socket /Sends a message on a socket statvfs: Gets fileset information argument/ execl: Executes a file argument/ execle: Executes a file and/ execv: Executes a file and an/ execve: Executes a file modif
Permuted Index 527186-003 Hewlett-Packard Company Pindex−27
Index _____________________________ A C accept function, 1-2 to 1-4 access changing for a file, 1-14 determining for a file, 1-5 access function, 1-5 to 1-7 access modes, file, 1-38, 1-40, 3-2 ar file format, 11-2 ar header file, 11-2 archive file format cpio, 11-4 tar, 11-35 archive library file format, 11-2 arguments, passing, 2-3, 2-11, 2-19, 2-27, 2-35, 2-43, 8-3, 8-17, 8-42, 8-58 ASCII character set, 12-2 to 12-3 attributes, saving modified, 3-31 character set, ASCII, 12-2 chdir function, 1-11 to 1
OSS System Calls Reference Manual D data sink file, 11-18 decimal ASCII character set, 12-3 descriptors.
Index LC_COLLATE, 12-10 SWAPVOL, 12-15 LC_CTYPE, 12-10 SYNC_CLOCKS, 12-15 LC_MESSAGES, 12-10 TANDEM_ALT_SRL, 12-15 LC_MONETARY, 12-11 TANDEM_INSTALL_DIR, LC_NUMERIC, 12-11 12-15 LC_TIME, 12-11 TCPIP_PROCESS_NAME, LD, 12-11 12-15 LOCPATH, 12-11 TCPIP_RESOLVER_NAME, LOG_THRESHOLD, 12-11 12-16 LOGNAME, 12-11 TERM, 12-16 MAKEFLAGS, 12-11 TERMCAP, 12-16 MANPATH, 12-11 TERMINFO, 12-16 MSGVERB, 12-11 TERMPATH, 12-16 MULTIPLE_LAN, 12-11 TIME_SERVER, 12-17 MXCMP, 12-12 TMOUT, 12-17 MXCMPUM, 12-12 TMPDIR, 12-17 MXSQL
OSS System Calls Reference Manual 7-46, 7-49, 7-56, 7-73, 7-77, 7-167, 7-177, 7-180, 8-13, 8-27, 8-39, 8-53, 8-69, 9-8, 9-12, 12-21 [EADDRINUSE], 1-8, 1-28, 12-21 [EADDRNOTAVAIL], 1-9, 1-28, 12-21 [EAFNOSUPPORT], 1-9, 1-28, 7-26, 7-30, 7-73, 7-77, 12-21 [EAGAIN], 2-8, 2-16, 2-24, 2-32, 2-40, 2-49, 3-6, 3-12, 4-43, 6-4, 6-11, 7-20, 8-14, 8-28, 8-39, 8-53, 8-70, 10-15, 10-20, 12-21 [EALREADY], 1-28, 12-21 [EBADCF], 12-21 [EBADDATA], 12-21 [EBADF], 1-3, 1-9, 1-25, 1-28, 1-38, 1-41, 3-6, 3-21, 3-29, 3-31, 3-33,
Index [EHAVEOOB], 12-23 [EHLDSEM], 8-14, 8-28, 8-39, 8-53, 8-70, 12-23 [EHOSTDOWN], 12-23 [EHOSTUNREACH], 1-29, 7-30, 12-23 [EIDRM], 4-41, 4-43, 7-20, 12-23 [EILSEQ], 12-23 [EINPROGRESS], 1-29, 12-23 [EINTR], 1-3, 1-6, 1-29, 1-35, 3-6, 3-29, 3-31, 3-33, 3-62, 4-41, 4-43, 5-10, 6-4, 6-11, 6-14, 6-17, 6-21, 7-8, 7-20, 7-23, 7-27, 7-31, 7-67, 7-177, 10-6, 10-12, 10-15, 10-20, 12-23 [EINVAL], 1-3, 1-6, 1-9, 1-16, 1-19, 1-23, 1-29, 1-35, 2-8, 2-17, 2-25, 2-32, 2-41, 2-49, 3-6, 3-29, 3-31, 3-33, 3-38, 3-42, 3-43,
OSS System Calls Reference Manual 10-16, 10-21, 12-24 [ENETRESET], 12-24 [ENETUNREACH], 1-29, 7-31, 12-25 [ENFILE], 1-3, 5-11, 7-73, 7-77, 12-25 [ENOBUFS], 1-3, 1-10, 1-29, 3-42, 3-50, 3-55, 4-10, 6-14, 6-17, 6-21, 7-23, 7-27, 7-31, 7-43, 7-58, 7-69, 7-73, 7-77, 12-25 [ENOCPU], 8-14, 8-28, 8-54, 8-70, 12-25 [ENOCRE], 12-25 [ENODATA], 12-25 [ENODEV], 2-9, 2-17, 2-25, 2-33, 2-41, 2-49, 8-14, 8-28, 8-54, 8-70, 12-25 [ENOENT], 1-7, 1-9, 1-12, 1-17, 1-19, 1-24, 1-29, 1-35, 2-9, 2-17, 2-25, 2-33, 2-41, 2-49, 4-7,
Index 7-28, 7-31, 7-43, 7-59, 12-26 [ENOTSUP], 3-63, 7-8, 7-181, 12-26 [ENOTTY], 3-63, 7-69, 12-26 [ENXIO], 1-7, 1-13, 1-17, 1-20, 1-24, 1-36, 3-21, 3-32, 3-63, 4-7, 4-21, 4-25, 4-31, 5-12, 6-7, 6-30, 6-34, 7-168, 7-181, 9-9, 9-13, 10-16, 10-21, 12-26 [EOPNOTSUPP], 1-3, 1-10, 1-36, 3-42, 3-50, 3-55, 3-63, 4-10, 5-12, 6-14, 6-18, 6-21, 7-23, 7-28, 7-31, 7-77, 12-26 [EOSSNOTRUNNING], 1-7, 1-13, 1-17, 1-20, 1-24, 1-36, 4-7, 4-21, 4-25, 4-31, 5-12, 5-15, 6-8, 6-30, 6-34, 7-168, 7-181, 9-9, 9-13, 12-26 [EPARTIAL
OSS System Calls Reference Manual execvp function, 2-43 to 2-50 _exit function, 2-51 to 2-52 F fast mutex, 5-86 fcntl function, 3-2 to 3-8 FIFOs creating, 4-27 propagating open, 8-4, 8-19, 8-38, 8-43, 8-59 file access flags O_RDONLY, 5-5 O_RDWR, 5-5 O_WRONLY, 5-5 file access modes, 1-38, 1-40 file descriptors checking I/O status of, 7-5 closing, 1-25 controlling, 1-40, 3-2 duplicating, 1-38, 1-40 sets for checking I/O status, 7-5 file format archive library, 11-2 cpio, 11-4 tar, 11-35 file mode creation ma
Index device file control, 3-60 dir, 11-7 directory.
OSS System Calls Reference Manual setting for a process, 7-34, 7-36 setting real and effective, 7-33 group list, returning for current process, 3-38 gtacl variables, PMSEARCHLIST, 12-12 Guardian environment, using from _exit function, 2-52 access function, 1-6 chdir function, 1-11 chmod function, 1-16 chown function, 1-19 chroot function, 1-23 creat function, 1-34 execl function, 2-8 execle function, 2-16 execlp function, 2-24 execv function, 2-32 execve function, 2-40 execvp function, 2-48 fork function, 3
Index readlink function, 6-6 readv function, 6-10 rename function, 6-27 rename_oss function, 6-27 select function, 7-7 stat function, 7-165 symlink function, 7-179 umask function, 9-4 utime function, 9-11 write function, 10-15 writev function, 10-20 H hexadecimal ASCII character set, 12-2 hierarchy, file system, 12-36 to 12-37 host, returning name of current, 3-39 hostname, returning for current host, 3-39 I I/O status, checking file descriptor sets for, 7-5 implementation-dependent constants, 11-10 inter
OSS System Calls Reference Manual memory image file, 11-3 message queue after disk process failures, 4-37 after processor failures, 4-37 cleaning up identifiers, 4-37 creating, 4-36 obtaining key for, 4-37 performing control operations on, 4-33 receiving a message from, 4-39 removing, 4-33 returning the identifier for, 4-36 sending a message to, 4-42 uniqueness of identifiers, 4-37 use between environments, 4-34, 4-37, 4-40, 4-43 messages receiving from a message queue, 4-39 receiving from connected sockets
Index 8-38, 8-43, 8-59 POSIX-defined minimum values, 11-13 process attaching shared memory segment, 7-45 changing scheduling priority, 5-2 changing signal mask, 7-65, 7-67 cleanup on exit, 2-51 creating a session, 7-36 creating via fork, 3-9 creating via tdm_fork, 8-30 effective group ID, 3-35, 7-33 effective user ID, 3-36, 7-44 examining signal mask, 7-65 executing new, 8-30, 8-40, 8-56, 12-39 exiting, 2-51 forking, 3-9, 8-30 group ID, 3-43, 3-44, 7-33, 7-36 performing shared memory control operations, 7-4
OSS System Calls Reference Manual 12-39 to 12-47 protocol, supporting sockets, 7-71 pthread_atfork function, 5-16 pthread_attr_destroy function, 5-18 pthread_attr_getdetachstate function, 5-19 pthread_attr_getguardsize_np function, 5-20 pthread_attr_getinheritsched function, 5-21 pthread_attr_getschedparam function, 5-22 pthread_attr_getschedpolicy function, 5-23 pthread_attr_getstackaddr function, 5-24 pthread_attr_getstacksize function, 5-25 pthread_attr_init function, 5-26 pthread_attr_setdetachstate fun
Index R read function, 6-2 to 6-5 read-write offset, setting for a file, 4-11 readlink function, 6-6 to 6-8 readv function, 6-9 to 6-12 recursive mutex, 5-86 recv function, 6-13 to 6-15 recvfrom function, 6-16 to 6-18 recvmsg function, 6-19 to 6-22 remote objects, using on fstat function, 3-20 lstat function, 4-20 stat function, 7-166 rename function, 6-23, 6-24 to 6-25, 6-26 to 6-31 rename_guardian function, 6-24 to 6-25, 6-27 rename_oss function, 6-24, 6-26 to 6-31 rmdir function, 6-32 to 6-35 root direc
OSS System Calls Reference Manual use between environments, 7-55 shell variables CDPATH, 12-4 COMP_ROOT, 12-5 EDITOR, 12-8 EMS_COLLECTOR, 12-8 ENV, 12-9 EXINIT, 12-9 FCEDIT, 12-9 FPATH, 12-9 HISTFILE, 12-9 HISTSIZE, 12-9 HOME, 12-9 IFS, 12-9, 12-20 JAVA_HOME, 12-9 LANG, 12-9 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 LOCPATH, 12-11 MANPATH, 12-11 NLSPATH, 12-12 PATH, 12-12 PRINTER, 12-12 PS1, 12-13, 12-20 PS2, 12-13, 12-20 PS3, 12-1
Index inherited by a process, 3-41, 3-49 listening for connections, 4-9 locally bound address, 3-49 name, 1-8 options for, 3-51 out-of-band data, 7-40 out-of-band mark, 7-69 propagating existing, 8-5, 8-19, 8-38, 8-43, 8-60 receiving messages from connected, 6-13 receiving messages from unconnected, 6-16 receiving messages using a message structure, 6-19 returning locally bound name, 3-49 returning options for, 3-51 returning peer address, 3-41 returning peer name, 3-41 returning transport-provider process
OSS System Calls Reference Manual spt_recvfrom function, 7-127 spt_recvmsg function, 7-128 spt_regFile function, 7-129 spt_regFileIOHandler function, 7-130 spt_regOSSFileIOHandler function, 7-131 spt_regPathsendFile function, 7-132 spt_regPathsendTagHandler function, 7-133 spt_regTimerHandler function, 7-135 spt_REPLYX function, 7-136 SPT_RESUMETRANSACTION, 7-185 spt_select function, 7-137 spt_send function, 7-138 spt_sendmsg function, 7-139 spt_sendto function, 7-140 SPT_SERVERCLASS_DIALOG_ABORT_ function,
Index locking a mutex, 5-79 locking a mutex without waiting, 5-80 obtaining the guardsize attribute, 5-20 obtaining the mutex attribute type, 5-83 obtaining the thread identifier, 5-89 Pathsend file use, 7-132 Pathsend tags, 7-133, 7-151 setting the mutex type attribute, 5-86 setting the scheduling policy, 5-36 signaling, 5-73 suspension, 7-143, 7-152 thread attributes object, 5-24 thread-aware fork, 7-96 TMF use, 7-107, 7-142, 7-146, 7-147, 7-148 unblocking all threads on a condition variable, 5-42 unblock
OSS System Calls Reference Manual _POSIX_NGROUPS_MAX, 11-13 _POSIX_OPEN_MAX, 11-13 _POSIX_PATH_MAX, 11-13 _POSIX_PIPE_BUF, 11-13 _POSIX_QLIMIT, 11-13 _POSIX_SSIZE_MAX, 11-13 _POSIX_STREAM_MAX, 11-14 _POSIX_TZNAME_MAX, 11-14 _TPC_BAD_ARGV, 12-40 _TPC_BAD_CPU, 12-43 _TPC_BAD_CREATE_OPTIONS, 12-43 _TPC_BAD_DEBUG_OPTIONS, 12-43 _TPC_BAD_DEFINES, 12-40, 12-44 _TPC_BAD_ENVIRON, 12-41 _TPC_BAD_ENVP, 12-41 _TPC_BAD_ERROR_DETAIL, 12-41 _TPC_BAD_EXTENSION, 12-41, 12-44 _TPC_BAD_EXTSWAP, 12-41, 12-44 _TPC_BAD_FDMAP, 1
Index _TPC_INSPECT_NOSAVE, 8-12, 8-26, 8-36, 8-51, 8-67 _TPC_INSPECT_SAVEABEND, 8-12, 8-26, 8-37, 8-51, 8-67 _TPC_NAME_SUPPLIED, 8-10, 8-24, 8-35, 8-49, 8-65 _TPC_NO_NAME, 8-10, 8-24, 8-35, 8-49, 8-65 _TPC_OVERRIDE_DEFMODE, 8-11, 8-25, 8-36, 8-50, 8-66 _TPC_PROCESS_DEFINES_ONLY, 8-11, 8-25, 8-36, 8-50, 8-66 _TPC_SUPPLIED_DEFINES_ONLY, 8-11, 8-25, 8-36, 8-50, 8-67 AF_INET, 7-71, 7-79, 7-81 AF_INET6, 7-71, 7-79, 7-81 AF_UNIX, 7-71, 7-75, 7-79, 7-81 ARG_MAX, 11-14 BC_BASE_MAX, 11-10 BC_DIM_MAX, 11-10 BC_SCALE_
OSS System Calls Reference Manual INPCK, 11-51 INT_BIT, 11-11 INT_MAX, 11-11 INT_MIN, 11-11 IOV_MAX, 11-14 IP_ADD_MEMBERSHIP, 7-38 IP_DROP_MEMBERSHIP, 7-38 IP_MULTICAST_IF, 3-52, 7-38 IP_MULTICAST_LOOP, 3-52, 7-39 IP_MULTICAST_TTL, 3-52, 7-39 IP_OPTIONS, 3-52, 7-38 IPC_CREAT, 7-15, 7-53 IPC_EXCL, 7-15, 7-53 IPC_NOWAIT, 7-19 IPC_PRIVATE, 7-15, 7-54 IPC_RMID, 4-33, 7-12, 7-48 IPC_SET, 4-33, 7-10, 7-12, 7-48 IPC_SETNONFT, 4-33 IPC_STAT, 4-34, 7-10, 7-12, 7-48 IPPROTO_IP, 3-51, 7-37 IPPROTO_IPV6, 3-51, 7-37 IPP
Index OCRNL, 11-52 ONLCR, 11-52 ONLRET, 11-52 ONOCR, 11-52 OPEN_MAX, 11-15 OPOST, 11-52 PARENB, 11-53 PARMRK, 11-52 PARODD, 11-53 PATH_MAX, 11-12 PIPE_BUF, 10-14, 10-19, 11-12 PRIO_PGRP, 3-47 PRIO_PROCESS, 3-47 PRIO_USER, 3-47 RE_DUP_MAX, 11-12 S_IFCHR, 3-15, 4-15, 4-27, 7-160 S_IFDIR, 3-15, 4-15, 4-23, 4-27, 7-161 S_IFIFO, 3-15, 4-15, 4-27, 7-161 S_IFMT, 3-15, 4-15, 7-160 S_IFREG, 1-32, 3-15, 4-15, 4-27, 5-8, 7-161 S_IFSOCK, 3-15, 4-15, 7-161 S_IRGRP, 1-15, 4-27, 7-53 S_IROTH, 1-15, 4-27, 7-53 S_IRUSR, 1-1
OSS System Calls Reference Manual SO_DEBUG, 3-53, 7-39 SO_DONTROUTE, 3-53, 7-39 SO_ERROR, 3-53 SO_KEEPALIVE, 3-53, 7-40 SO_LINGER, 1-26, 3-53, 7-40 SO_OOBINLINE, 3-53, 7-40 SO_RCVBUF, 3-53, 7-40 SO_REUSEADDR, 3-53, 7-40 SO_REUSEPORT, 3-53, 7-41 SO_SNDBUF, 3-54, 7-41 SO_TYPE, 3-54 SOCK_DGRAM, 3-54 SOCK_MAXBUF, 11-15 SOCK_STREAM, 3-54 SOL_SOCKET, 3-51, 7-37 SPAWN_NEWPGROUP, 8-44, 8-61 SPAWN_SETPGROUP, 8-44, 8-61 SPAWN_SETSIGDEF, 8-44, 8-61 SPAWN_SETSIGMASK, 8-44, 8-61 ST_NOSUID, 3-28, 7-174 ST_NOTRUNC, 3-28,
Index U ulimit function, 9-2 to 9-3 umask function, 9-4 uname function, 9-5 to 9-6 unlink function, 9-7 to 9-10 user, getting scheduling priority, 3-47 user environment variables, 12-4 to 12-20 user ID returning effective, 3-36 returning real, 3-59 setting real and effective, 7-44 utime function, 9-11 to 9-13 V virtual addresses, specifying for shared memory, 7-45, 7-51 virtual memory, and shared memory segments, 7-45, 7-51 W wait function, 10-2 to 10-6 waitpid function, 10-7 to 10-12 write function, 10-