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 J06.03 and all subsequent J-series RVUs, H06.08 and all subsequent H-series RVUs, and G06.29 and all subsequent G-series RVUs until otherwise indicated by its replacement publication.
Document History Part Number Product Version Published 527186-019 527186-020 527186-021 527186-022 527186-023 N/A N/A N/A N/A N/A February 2012 August 2012 February 2013 August 2013 February 2014
Contents _____________________________ What Is New in This Manual . . . . . . . . . . . . . . . . . . . . ix Changed Functions . . . . . . . . . . . . . . . . . . . x About This Manual . . . . . . . . . . . . . . . . . . . . . . xi Audience . . . . . . . . . . . . . . . . . . . . . . xii Purpose . . . . . . . . . . . . . . . . . . . . . xii . . . . . . . . . . . . . . . . . . .
OSS System Calls Reference Manual fstat . . fstat64 . fstatvfs . fstatvfs64 fsync . . ftruncate . ftruncate64 getegid . geteuid . getgid . . getgroups gethostname getpeername getpgid . getpgrp . getpid . . getppid . getpriority getsid . . getsockname getsockopt gettimeofday getuid . . ioctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents pthread_attr_getstackaddr . . pthread_attr_getstacksize . . pthread_attr_init . . . . pthread_attr_setdetachstate . pthread_attr_setguardsize . . pthread_attr_setguardsize_np . pthread_attr_setinheritsched . pthread_attr_setschedparam . pthread_attr_setschedpolicy . pthread_attr_setscope . . . pthread_attr_setstacksize . . pthread_cancel . . . . . pthread_cleanup_pop . . . pthread_cleanup_push . . . pthread_condattr_destroy . . pthread_condattr_init . . . pthread_cond_broadcast . .
OSS System Calls Reference Manual pthread_setconcurrency . . . . pthread_setschedparam . . . . pthread_setspecific . . . . . . pthread_sigmask . . . . . . pthread_signal_to_cancel_np . . . pthread_testcancel . . . . . . pthread_unlock_global_np . . . put_awaitio . . . . . . . . PUT_CANCEL . . . . . . . PUT_CONTROL . . . . . . put_fd_read_ready . . . . . . put_fd_write_ready . . . . . . PUT_FILE_CLOSE_ . . . . . PUT_FILE_OPEN_ . . . . . PUT_FILE_WRITEREAD_ . . . put_generateTag . . . . . .
Contents PUT_WRITEUPDATEX PUT_WRITEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-305 5-311 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OSS System Calls Reference Manual sockatmark . . . . . socket . . . . . . . socketpair . . . . . socket_transport_name_get socket_transport_name_set spt_accept . . . . . spt_acceptx . . . . . spt_alarm . . . . . spt_awaitio . . . . . SPT_CANCEL . . . . spt_close . . . . . . spt_closex . . . . . spt_closez . . . . . spt_connect . . . . . spt_connectx . . . . SPT_CONTROL . . . spt_dup2x . . . . . spt_fclose . . . . . spt_fclosex . . . . . spt_fcntlx . . . . . spt_fcntlz . . . . . spt_fd_read_ready . . .
Contents spt_getcharx . . . . . . . spt_getcx . . . . . . . . spt_gets . . . . . . . . spt_getsx . . . . . . . . spt_getTMFConcurrentTransactions spt_getw . . . . . . . . spt_getwc . . . . . . . spt_getwchar . . . . . . spt_getwcharx . . . . . . spt_getwcx . . . . . . . spt_getwx . . . . . . . spt_INITRECEIVE . . . . . spt_INITRECEIVEL . . . . spt_interrupt . . . . . . . spt_interruptTag . . . . . SPT_LOCKFILE . . . . . SPT_LOCKREC . . . . . spt_lseek64z . . . . . . . spt_lseekz . . . . . . .
OSS System Calls Reference Manual spt_regOSSFileIOHandler . . . spt_regPathsendFile . . . . . spt_regPathsendTagHandler . . . spt_regTimerHandler . . . . . spt_REPLYX . . . . . . . spt_REPLYXL . . . . . . . spt_select . . . . . . . . spt_select_single_np . . . . . spt_send . . . . . . . . . spt_sendmsg . . . . . . . . spt_sendmsgx . . . . . . . spt_sendto . . . . . . . . spt_sendtox . . . . . . . . spt_sendx . . . . . . . . SPT_SETMODE . . . . . . spt_setOSSFileIOHandler . . . .
Contents statvfs . statvfs64 . symlink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-515 7-524 7-533 Section 8. System Functions (t) tdm_execve . . . tdm_execvep . . tdm_fork . . . . tdm_spawn . . . tdm_spawnp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OSS System Calls Reference Manual Index xii . . . . . . . . . . . . . . . . . . Hewlett-Packard Company . . . . . . . .
Contents LIST OF TABLES Table 3−1. Ignored File Status Flags . . . . . . . . . . . . . . . . . 3-13 Table 5−1. Levels of Guardian File Security . . . . . . . . . . . . . . . 5-206 Table 5−2. Allowed Guardian File Accesses . . . . . . . . . . . . . . . 5-207 Table 7−1. Ignored File Status Flags (spt_fcntlx Function) . . . . . . . . . . . 7-160 Table 7−2. Ignored File Status Flags . . . . . . . . . . . . . . . . .
What Is New in This Manual This section describes changes made to the Open System Services System Calls Reference Manual since the last edition (527186-022). Unless otherwise indicated in the text, discussions of native mode behavior, processes, and so forth apply to both the TNS/R code that runs on systems running G-series RVUs and to the TNS/E code that runs on systems running J-series RVUs or H-series RVUs.
OSS System Calls Reference Manual Changed Functions The following reference pages were changed to correct errors: • gettimeofday( ) • put_awaitio( ) • PUT_FILE_OPEN_( ) The following reference pages were changed to support the increase in message queue limits: x • msgctl( ) • msgget( ) • msgrcv( ) • msgsnd( ) Hewlett-Packard Company 527186-023
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 API provided with the 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. Document Usage This manual contains a portion of the online reference (man) pages.
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 (4) File formats and data structures OSS System Calls Reference Manual OSS Library Calls Reference Manual OSS Shell and Utilities Reference Manual (5) Miscellaneous topics and environment variables (6) Games OSS Syst
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
System Functions (a - d) accept(2) If the queue of pending connections is empty of connection requests and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the accept( ) function blocks until a connection is present. If the socket’s file descriptor is marked nonblocking (O_NONBLOCK is set) and the queue of pending connections is empty, the accept( ) function call fails and sets errno to [EWOULDBLOCK].
accept(2) OSS System Calls Reference Manual [EADDRINUSE] The address is already in use. This error is returned in the OSS environment only. [EBADF] The socket parameter is not a valid file descriptor. This error is also returned if the accept( ) function is thread-aware and the socket becomes invalid (is closed by another thread). [ECONNABORTED] The connection was aborted. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available.
System Functions (a - d) accept(2) RELATED INFORMATION Functions: bind(2), connect(2), fcntl(2), listen(2), socket(2), spt_acceptx(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].
access(2) OSS System Calls Reference Manual NAME access - Determines the accessibility of a file LIBRARY G-series native OSS processes: system library H-series and J-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.
System Functions (a - d) access(2) specified in the class entry bitwise-ANDed with the result of bitwise-ORing together all of the permissions in all matching group entries. Otherwise, continue to the next check. 4. Otherwise, grant the permissions specified in the other entry. Files in the Guardian File System If the specified pathname resolves to the /G directory itself, the calling process has read and execute access but not write access. The permissions are "r-xr-xr-x".
access(2) OSS System Calls Reference Manual [EINTR] A signal was caught during execution of the function call. [EINVAL] The access_mode parameter contains an invalid bit pattern. [EIO] An I/O error occurred during a read from or a write to the fileset. [ELOOP] Too many symbolic links were encountered in translating the pathname.
System Functions (a - d) access(2) [EROFS] Write access is requested for a file on a read-only fileset. [ETXTBSY] Write access is requested for a pure procedure (shared text) file that is being executed. RELATED INFORMATION Commands: getacl(1), setacl(1). Functions: acl(2), chmod(2), stat(2). Miscellaneous topics: acl(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define.
acl(2) OSS System Calls Reference Manual NAME acl - Sets access control list (ACL) information for a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include
System Functions (a - d) cmd acl(2) Specifies the action to be taken by the acl( ) function. The cmd parameter can be one of these values: ACL_SET The acl( ) function stores the entries specified by the nentries and aclbufp parameters in the ACL for the file. The new ACL replaces any existing ACL for the file. This value for cmd can only be executed by a process that has an effective user ID equal to the owner of the file or the super ID, or is a member of the Safeguard SECURITY-OSS-ADMINISTRATOR group.
acl(2) OSS System Calls Reference Manual For more information about restricted-access filesets and file privileges, see the Open System Services Management and Operations Guide. NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit applications or 64-bit OSS applications.
System Functions (a - d) acl(2) [ENOSYS] This system does not support OSS ACLs. [ENOTDIR] Either of these conditions is true: • A component of the path specified by pathp is not a directory. • The value of the cmd parameter is ACL_SET, and an attempt was made to set a default ACL on a file type other than a directory.
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 and J-series OSS processes: implicit libraries SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include int bind( int socket, const struct sockaddr *address, socklen_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) NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the bind( ) function returns the value 0 (zero). Otherwise, the bind( ) function returns -1 and sets errno to indicate the error.
bind(2) OSS System Calls Reference Manual [EIO] An input or output error occurred for an AF_UNIX socket. [ELOOP] The socket is in the AF_UNIX domain and too many symbolic links were encountered when translating the pathname specified in the sockaddr structure. [ENAMETOOLONG] The socket is in the AF_UNIX domain and one of the following conditions exists: • The pathname in the sockaddr structure exceeds PATH_MAX characters.
System Functions (a - d) bind(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 [EISCONN], [EISDIR], [ENOSR], or [EPROTO]. The following are HP extensions to the XPG4 specification: • 527186-023 The errno value [ECONNRESET] can be returned when the transport provider process is unavailable.
chdir(2) OSS System Calls Reference Manual NAME chdir - Changes the current working directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int chdir( const char *path); PARAMETERS path Points to the pathname of the directory.
System Functions (a - d) chdir(2) Use From the Guardian Environment The chdir( ) 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.
chdir(2) OSS System Calls Reference Manual [ENOROOT] • The specified pathname cannot be mapped to a valid Guardian filename. • The specified pathname points to the name of a Guardian process that is not of subtype 30. • The path parameter names a symbolic link, but the directory 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) chmod(2) NAME chmod - Changes file-access permissions LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int chmod( const char *path, mode_t mode); PARAMETERS path Specifies the full pathname of the file.
chmod(2) OSS System Calls Reference Manual S_ISGID Sets the process’s effective group ID to the group ID of the file’s group on execution. S_ISVTX For a directory, permits modification to the directory only if the effective user ID of the process matches that of the file being accessed. S_IRWXU Permits the file’s owner to read, write, and execute the file (or to search the directory). S_IRUSR Permits the file’s owner to read the file. S_IWUSR Permits the file’s owner to write to the file.
System Functions (a - d) chmod(2) Access Control Lists (ACLs) When you execute the chmod( ) function, you can change the effective permissions granted by optional entries in the ACL for a file.
chmod(2) OSS System Calls Reference Manual NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the chmod( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, and errno is set to indicate the error.
System Functions (a - d) chmod(2) [ENOTDIR] A component, other than the last part, of the path parameter 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.
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 and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
System Functions (a - d) chown(2) Access Control Lists (ACLs) A user can allow or deny specific individuals and groups access to a file by using an ACL on the file. When using the chown( ) function with ACLs, if the new owner and/or group of a file have optional ACL entries corresponding to user:uid:perm or group:gid:perm in the ACL for a file, those entries remain in the ACL but no longer have any effect because they are superseded by the user::perm or group::perm entries in the ACL.
chown(2) OSS System Calls Reference Manual 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. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (a - d) [ENOENT] [ENOTSUP] [ENOROOT] chown(2) One of these is true: • The path parameter does not exist. • 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.
chown(2) OSS System Calls Reference Manual RELATED INFORMATION Commands: chgrp(1), chown(1), getacl(1), setacl(1). Functions: acl(2) chmod(2), fchmod(2), fchown(2), lchmod(2), lchown(2), setfilepriv(2). Miscellaneous topics: acl(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define.
System Functions (a - d) chroot(2) NAME chroot - Changes the effective root directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int chroot( const char *path); PARAMETERS path Specifies the new effective root directory.
chroot(2) OSS System Calls Reference Manual Use From the Guardian Environment The chroot( ) function is one of a set of functions that have the following effects when the first of them is called from the Guardian environment: • Two Guardian file-system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (a - d) [ENOENT] chroot(2) One of the following conditions exists: • The named directory does not exist. • The specified pathname is an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. [ENOROOT] The root fileset (fileset 0) is not in the STARTED state. [ENOTDIR] A component of the specified pathname is not a directory. [ENXIO] The fileset containing the client’s working directory or effective root directory is not mounted.
close(2) OSS System Calls Reference Manual NAME close - Closes a file descriptor LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (a - d) close(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. To use this function in a 32-bit threaded application on systems running H06.24 or later RVUs or J06.
close(2) OSS System Calls Reference Manual • The socket has untransmitted data. the close( ) function does not block. The system attempts to deliver unsent data after the close( ) function is called, although that action can be disabled. See the setsockopt(2) reference page for additional information. HP extensions to the XPG4 Version 2 specification are: • The close( ) function can return the errno value [EISGUARDIAN].
System Functions (a - d) connect(2) NAME connect - Connects a socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
connect(2) OSS System Calls Reference Manual • If the initiating socket is connection-oriented (has the type SOCK_STREAM), then the connect( ) function attempts to make a connection to the socket specified by the address parameter. Sockets of type SOCK_STREAM can successfully connect only once.
System Functions (a - d) connect(2) • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). For detailed information about writing multi-threaded and 64-bit applications for the Open System Services environment, see the Open System Services Programmer’s Guide. RETURN VALUES Upon successful completion, the connect( ) function returns the value 0 (zero).
connect(2) OSS System Calls Reference Manual [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The socket can only be closed. [EFAULT] A user-supplied memory buffer cannot be accessed. [EHOSTUNREACH] The destination host cannot be reached.
System Functions (a - d) connect(2) [ENETDOWN] The local interface used to reach the destination is down. [ENETUNREACH] No route to the network or host is present. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time may succeed. [ENOENT] The socket is in the AF_UNIX domain and one of the following conditions exists: • A component of the pathname specified in the sockaddr structure does not name an existing file.
connect(2) OSS System Calls Reference Manual industry standards: • 1−42 IEEE Std 1003.
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 and J-series native Guardian processes: implicit libraries H-series and J-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 returned file descriptor is the lowest-numbered file descriptor not currently open for that process. A corresponding Guardian environment file number is also assigned. The file offset, marking the current position within the file, is set to the beginning of the file. The new file descriptor is set to remain open across the processing of any of the exec or tdm_exec set of functions. (See the fcntl(2) reference page.
System Functions (a - d) creat(2) File Type Flags The file type flags that can be logically ORed into the value specified in the mode parameter are: S_IFREG Regular file in the OSS file system or in /G, the Guardian file system. S_ISVTX Sticky bit; used only for directories (cannot be used for files in /G, the Guardian file system). Access Control Lists (ACLs) The creat( ) function does not change the ACL for an existing file.
creat(2) OSS System Calls Reference Manual • If the file is an EDIT file and write access is specified, the call fails, and errno is set to the value [EINVAL]. • The maximum number of opens is reported by the sysconf( ) function as the upper limit of opens per process. The actual limit depends on other factors, such as the size of the process file segment (PFS) and the number of existing opens on directories or on files in the Guardian environment.
System Functions (a - d) creat(2) RETURN VALUES Upon successful completion, the creat( ) 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.
creat(2) OSS System Calls Reference Manual [EIO] A physical input or output error occurred. Data might have been lost during transfer. [EISDIR] One of these conditions exists: • The named file is an OSS directory. • The named file is a Guardian directory (/G or a directory in the /G file system). [ELOOP] Too many symbolic links were encountered in translating the path parameter. [EMFILE] The system limit for open file descriptors per process has reached the maximum permitted.
System Functions (a - d) [ENOTSUP] [ENXIO] creat(2) The path parameter specifies a Guardian file on an SMF logical volume and one of the following conditions exists: • The local system is running an RVU prior to J06.15 or H06.26. • The path parameter specifies a file in /E and the remote system is running an RVU prior to J06.15 or H06.26. One of these conditions exists: • The named file is a character special file, and the device associated with this special file does not exist.
creat(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • The group ID of the new file is determined by the value of the O_ISGID flag in the parent directory. • 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.
System Functions (a - d) creat64(2) NAME creat64 - 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 and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include #include
creat64(2) OSS System Calls Reference Manual An application call to creat( ) is automatically mapped to this function when you use the #define _FILE_OFFSET_BITS 64 feature test macro or an equivalent compiler command option to compile the application. The creat64( ) function establishes a connection between the file indicated by the path parameter and the returned file descriptor. Subsequent I/O function calls, such as read( ) and write( ), use the opened file descriptor to access that file.
System Functions (a - d) • creat64(2) The file does not allow write access. File Type Flags The file type flags that can be logically ORed into the value specified in the mode parameter are: S_IFREG Regular file in the OSS file system or in /G, the Guardian file system. S_ISVTX Sticky bit; used only for directories (cannot be used for files in /G, the Guardian file system). Access Control Lists (ACLs) The creat64( ) function does not change the ACL for an existing file.
creat64(2) OSS System Calls Reference Manual • An attempt to open a subvolume with a reserved name beginning with "ZYQ" (for example, /G/vol2/zyq00004) fails, and errno is set to the value of [EACCES]. • An attempt to open a file within a subvolume with a reserved name beginning with "ZYQ" (for example, /G/vol2/zyq00004/z000002x) fails, and errno is set to the value of [EACCES]. • If the file is not an EDIT file (that is, the file code is not 101), it is opened in shared exclusion mode.
System Functions (a - d) creat64(2) RETURN VALUES Upon successful completion, the creat64( ) 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.
creat64(2) OSS System Calls Reference Manual • The function attempted to create a Guardian temporary file. [EIO] A physical input or output error occurred. Data might have been lost during transfer. [EISDIR] One of these conditions exists: • The named file is an OSS directory. • The named file is a Guardian directory (/G or a directory in the /G file system). [ELOOP] Too many symbolic links were encountered in translating the path parameter.
System Functions (a - d) [ENOTSUP] [ENXIO] creat64(2) The path parameter specifies a Guardian file on an SMF logical volume and one of the following conditions exists: • The local system is running an RVU prior to J06.15 or H06.26. • The path parameter specifies a file in /E and the remote system is running an RVU prior to J06.15 or H06.26. One of these conditions exists: • The named file is a character special file, and the device associated with this special file does not exist.
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (a - d) dup2(2) • Returns the same file status flags (that is, both file descriptors share the same file status flags). • Clears the close-on-exec flag (FD_CLOEXEC bit) associated with the new file descriptor so that the file remains open across calls to any function in the exec, tdm_exec, and tdm_spawn sets of functions. 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.
dup2(2) OSS System Calls Reference Manual • The filedes parameter is not a valid open file descriptor. • The new parameter file descriptor is negative or greater than the maximum number of opens permitted. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [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.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execl( const char ∗ path, const char ∗ arg, . . .
execl(2) OSS System Calls Reference Manual environment variables. The argv[ ] array is terminated by a null pointer. The null pointer is not 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.
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) • pr_TPCerror is the Guardian PROCESS_LAUNCH_ or PROCESS_CREATE_ error. [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.
execl(2) OSS System Calls Reference Manual RELATED INFORMATION Commands: eld(1), ld(1), nld(1). Functions: alarm(3), _exit(2), execle(2), execlp(2), execv(2), execve(2), execvp(2, fcntl(2), fork(2), getenv(3), putenv(3), semget(2), sigaction(2), system(3), tdm_execve(2), tdm_execvep(2), tdm_fork(2), tdm_spawn(2), tdm_spawnp(2), times(3), ulimit(3), umask(2). Miscellaneous: environ(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execle( const char ∗ path, const char ∗ arg, . . .
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. [EIO] 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.
execle(2) OSS System Calls Reference Manual [ENOMEM] Required resources are not available. Subsequent calls to the same function will not succeed for the same reason. Possible causes of this error include insufficient primary memory (stack, globals, or heap) for the new process. [ENOTDIR] A component of the path prefix of the new process image file is not a directory. [ENOTOSS] The calling process is not an OSS process.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include extern char ∗ ∗ environ; int execlp( const char ∗ file, const char ∗ arg, . . .
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. [EIO] 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.
execlp(2) OSS System Calls Reference Manual [EPERM] [ETXTBSY] One of the following conditions exist: • The calling process does not have appropriate privileges. • The program attempted an operation on a SEEP-protected fileset. Valid for J06.15 and later J-series RVUs, and H06.26 and later H-series RVUs. The new process image file is currently open for writing by a process. [EUNKNOWN] Unknown error. An unrecognized or very obscure error occurred.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll 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.
execv(2) OSS System Calls Reference Manual environment variables. The argv[ ] array is terminated by a null pointer. The null pointer is not 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.
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) • pr_errno is the [EIO] error • pr_TPCerror is the Guardian PROCESS_LAUNCH_ or PROCESS_CREATE_ error. [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.
execv(2) OSS System Calls Reference Manual [EUNKNOWN] Unknown error. An unrecognized or very obscure error occurred. If this error occurs, follow site-defined procedures for reporting software problems to HP. RELATED INFORMATION Commands: eld(1), ld(1), nld(1).
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
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. [EIO] 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. This value is used for errors on the object file of a loaded program or library, or during data transfer with a Guardian environment home terminal. For systems running J06.
execve(2) OSS System Calls Reference Manual [ENOTDIR] A component of the path prefix of the new process image file is not a directory. [ENOTOSS] The calling process is not an OSS process. A function in the exec set of functions cannot be called from the Guardian environment. [EPERM] One of the following conditions exist: [ETXTBSY] • The calling process does not have appropriate privileges. • The program attempted an operation on a SEEP-protected fileset. Valid for J06.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
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 [ENOMEM] Required resources are not available. Subsequent calls to the same function will not succeed for the same reason. Possible causes of this error include insufficient primary memory (stack, globals, or heap) for the new process. [ENOTDIR] A component of the path prefix of the new process image file is not a directory. [ENOTOSS] The calling process is not an OSS process.
System Functions (e) _exit(2) NAME _exit - Terminates a process LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series native Guardian processes: implicit libraries H-series OSS processes: implicit libraries SYNOPSIS #include void _exit( int status); PARAMETERS status Indicates the status of the process.
_exit(2) OSS System Calls Reference Manual new controlling process. • If the exit of a process causes a process group to become orphaned, and if any member of the newly orphaned process group is stopped, then a SIGHUP signal followed by a SIGCONT signal is sent to each member of the orphaned process group. • Locks set by the fcntl( ) function are removed. Use From the Guardian Environment The _exit( ) function can be called from any Guardian process as well as from OSS processes.
Section 3. System Functions (f - i) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with f through i. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
fchmod(2) OSS System Calls Reference Manual NAME fchmod - Changes file-access permissions LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
System Functions (f - i) fchmod(2) S_ISGID Sets the process’s effective group ID to the group ID of the file’s group on execution. S_ISVTX For a directory, permits modification to the directory only if the effective user ID of the process matches that of the file being accessed. S_IRWXU Permits the file’s owner to read, write, and execute the file (or to search the directory). S_IRUSR Permits the file’s owner to read the file. S_IWUSR Permits the file’s owner to write to the file.
fchmod(2) OSS System Calls Reference Manual Access Control Lists (ACLs) When you execute the fchmod( ) function, you can change the effective permissions granted by optional entries in the ACL for a file.
System Functions (f - i) fchmod(2) NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the fchmod( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, and errno is set to indicate the error.
fchmod(2) OSS System Calls Reference Manual Miscellaneous topics: acl(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • To change file-access permissions, either the process must have the same effective user ID as the owner of the file or the process must have an effective user ID of the super ID.
System Functions (f - i) fchown(2) NAME fchown - Changes the owner and group IDs of a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
fchown(2) OSS System Calls Reference Manual Access Control Lists (ACLs) A user can allow or deny specific individuals and groups access to a file by using an ACL on the file. When using the fchown( ) function with ACLs, if the new owner and/or group of a file have optional ACL entries corresponding to user:uid:perm or group:gid:perm in the ACL for a file, those entries remain in the ACL but no longer have any effect because they are superseded by the user::perm or group::perm entries in the ACL.
System Functions (f - i) fchown(2) Use From the Guardian Environment The fchown( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
fchown(2) OSS System Calls Reference Manual [EOSSNOTRUNNING] The program attempted an operation on an object in the OSS environment while a required system process was not running. [EPERM] The calling process does not have appropriate privileges. [EROFS] The file referred to by filedes resides on a read-only fileset. For all other error conditions, errno is set to the appropriate Guardian file-system error number.
System Functions (f - i) fcntl(2) NAME fcntl - Controls open file descriptors LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include #include
fcntl(2) OSS System Calls Reference Manual • Clears the close-on-exec flag (FD_CLOEXEC bit) associated with the new file descriptor so that the file remains open across calls to any function in the exec, tdm_exec, or tdm_spawn sets of functions. The value F_DUPFD is invalid for an OSSTTY or Telserv terminal device. If this value is used in a call that specifies such a device for the filedes parameter, the call fails and errno is set to [EINVAL].
System Functions (f - i) fcntl(2) Table 3−1. Ignored File Status Flags File type Ignored file status flags _ _____________________________________________ Directory FIFO, pipe Character special file Regular file Socket O_APPEND, O_NONBLOCK, O_SYNC O_APPEND, O_SYNC O_APPEND, O_SYNC O_NONBLOCK O_APPEND, O_SYNC These file status flags are always accepted and ignored: O_ACCMODE O_CREAT O_EXCL O_TRUNC The file access mode is not changed when F_SETFL is used.
fcntl(2) OSS System Calls Reference Manual F_GETLK64 Similar to F_GETLK, except that it takes a pointer to a flock64 structure instead of a pointer to a flock structure. F_SETLK Sets or clears a file segment lock according to the lock description pointed to by the argument2 parameter. F_SETLK is used to establish shared locks (F_RDLCK) or exclusive locks (F_WRLCK) and, additionally, to remove either type of lock (F_UNLCK).
System Functions (f - i) fcntl(2) Changing or unlocking a portion from the middle of a larger locked segment leaves a smaller segment at either end. Locking a segment that is already locked by the calling process causes the old lock type to be removed and the new lock type to take effect. All locks associated with a file for a given process are removed when a file descriptor for that file is closed by that process or when the process holding that file descriptor terminates.
fcntl(2) OSS System Calls Reference Manual F_SETFL Returns the value 0 (zero). F_SETLK Returns the value 0 (zero). F_SETLK64 Returns the value 0 (zero). F_SETLKW Returns the value 0 (zero). F_SETLKW64 Returns the value 0 (zero). F_SETOWN Returns the value 0 (zero). If the fcntl( ) function fails, the value -1 is returned, and errno is set to indicate the error.
System Functions (f - i) [EINVAL] [EIO] fcntl(2) One of these conditions exists: • The request parameter is F_DUPFD, and the argument1 parameter is negative or greater than or equal to the maximum number of open file descriptors permitted. • The request parameter is F_GETLK, F_GETLK64, F_SETLK, F_SETLK64, F_SETLKW,or F_SETLKW64, and the data pointed to by argument2 is invalid, or filedes refers to a file that does not support locking.
fcntl(2) OSS System Calls Reference Manual [EOVERFLOW] The command argument is F_GETLK, F_SETLK, or FSETLKW, and the smallest offset (if l_len parameter is zero), or the highest offset (if the l_len parameter is nonzero), of any byte in the requested segment cannot be represented correctly in an object of type off_t.
System Functions (f - i) fork(2) NAME fork - Creates a new process LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include /* optional except for POSIX.
fork(2) OSS System Calls Reference Manual • The parent process ID of the child process matches the PID of the parent. • 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) • Creator access ID (CAID) • 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 Sharing Guardian Files After a successful call to the fork( ) function, the initial position within an EDIT file (file code 101) in the Guardian file system (a file in /G) that was opened by a call to the OSS open( ) function is the same for both the parent and child processes. However, the position is not shared; that is, changing the position used by one process does not change the position used by the other process.
System Functions (f - i) fork(2) ERRORS If any of the following conditions occurs, the fork( ) function sets errno to the corresponding value: [EACCES] Open for execute access on the code file or any library file was denied. [EAGAIN] System resources such as disk space, process control block (PCB) space, MAPPOOL space, stack space, or PFS space are temporarily inadequate. [EIO] Some physical input or output error has occurred.
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include
System Functions (f - i) fstat(2) mode_t st_basemode; /* Permissions with original group perms */ #endif int64_t st_reserved[3]; }; For J06.10 and earlier J-series RVUs and H06.21 and earlier H-series RVUs, the stat structure uses this definition from the sys/stat.
fstat(2) OSS System Calls Reference Manual /dev/null /dev/tty st_ino ID of device containing directory entry ID of device containing directory entry File serial number (inode number). The file serial number and OSS device identifier uniquely identify a regular OSS file within an OSS fileset. 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) 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_TRUST 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 when the memory segment containing the buffers is not shared.
fstat(2) OSS System Calls Reference Manual st_gid For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the calling process User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed next.
System Functions (f - i) st_atime fstat(2) For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
fstat(2) OSS System Calls Reference Manual st_ctime Status change time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (f - i) fstat(2) Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text See followin
fstat(2) OSS System Calls Reference Manual For J06.09 and later J-series RVUs and H06.20 and later H-series RVUs, access by the OSS Network File System (NFS) to OSS objects that have OSS ACLs that contain optional ACL entries can be allowed, depending upon the NFSPERMMAP attribute value for the fileset that contains the object. For more information about NFS and ACLs, see the acl(5) reference page.
System Functions (f - i) fstat(2) [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOROOT] The program attempted an operation while the root fileset was unavailable. [ENXIO] An invalid device or address was specified during an input or output operation on a special file.
fstat(2) OSS System Calls Reference Manual • The S_IRWXU, S_IRWXG, S_IRWXO, S_IFMT, S_ISVTX, S_ISGID, and S_ISUID bits are ORed into the st_mode field of the stat structure. HP extensions to the XPG4 Version 2 specification are: • The errno values [EFAULT], [EFSBAD], [EIO], [EISGUARDIAN], [ENETDOWN], [ENOROOT], [ENXIO], and [EWRONGID] can be returned by the fstat( ) function.
System Functions (f - i) fstat64(2) NAME fstat64 - Provides information about an open file LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include
fstat64(2) OSS System Calls Reference Manual The file information is written to the area specified by the buffer parameter, which is a pointer to a stat64 structure which is a pointer to a stat64 structure. For J06.11 and later J-series RVUs and H06.22 and later H-series RVUs, the stat64 structure uses this definition from the sys/stat.
System Functions (f - i) fstat64(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).
fstat64(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 Permissions for the owning group, or if the st_acl flag is set, permissions for the the class ACL entry.
System Functions (f - i) fstat64(2) st_fileprivs File privileges. For information about file privileges see the setfilepriv(2) reference page. st_uid 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.
fstat64(2) st_size OSS System Calls Reference Manual File size. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page. st_atime For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed next.
System Functions (f - i) st_ctime fstat64(2) Status change time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
fstat64(2) OSS System Calls Reference Manual Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text S
System Functions (f - i) fstat64(2) For J06.09 and later J-series RVUs and H06.20 and later H-series RVUs, access by the OSS Network File System (NFS) to OSS objects that have OSS ACLs that contain optional ACL entries can be allowed, depending upon the NFSPERMMAP attribute value for the fileset that contains the object. For more information about NFS and ACLs, see the acl(5) reference page.
fstat64(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. [ENOROOT] The program attempted an operation while the root fileset was unavailable. [ENXIO] An invalid device or address was specified during an input or output operation on a special file.
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 and J-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( ), creat64( ), dup( ), dup2( ), fcntl( ),open( ), or open64( ) 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 might have failed. 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. [EOVERFLOW] One of the values returned cannot be represented correctly in the structure pointed to by the buffer parameter.
System Functions (f - i) fstatvfs64(2) NAME fstatvfs64 - Gets fileset information for an open file LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int fstatvfs64( int filedes, struct statvfs64 *buffer); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the creat( ), creat64( ), dup( ), dup2( ), fcntl( ), open( ), or open64( ) function.
fstatvfs64(2) OSS System Calls Reference Manual The fields in this structure have these meanings and content: f_bsize f_frsize f_blocks Fileset 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 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 o
System Functions (f - i) f_bfree fstatvfs64(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.
fstatvfs64(2) f_files f_ffree OSS System Calls Reference Manual Total number of file serial numbers (inode numbers) in the fileset: 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.
System Functions (f - i) f_fsid fstatvfs64(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.
fstatvfs64(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 fstatvfs64(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.
fstatvfs64(2) OSS System Calls Reference Manual might have failed. 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.
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
fsync(2) OSS System Calls Reference Manual On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. To use this function in a 32-bit threaded application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to make the function thread-aware in a multi-threaded application on systems running H06.21/J06.10 or later RVUs.
System Functions (f - i) fsync(2) • The fileset containing the requestor’s current working directory or root directory is not mounted. This error can occur after failure and restart of an OSS name server process until the fileset has been repaired and remounted. [EWRONGID] One of these conditions occurred: • The process attempted an operation through an operating system input/output process (such as a terminal server process) that has failed or is in the down state.
ftruncate(2) OSS System Calls Reference Manual NAME ftruncate - Changes file length LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (f - i) ftruncate(2) NOTES To use the ftruncate( ) functionality in a threaded application that uses the Standard POSIX Threads library, see spt_ftruncatez(2). To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.
ftruncate(2) OSS System Calls Reference Manual [EIO] 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. The device holding the file might be in the down state, or both processors that provide access to the device might have failed. Data might have been lost during a transfer.
System Functions (f - i) ftruncate64(2) NAME ftruncate64 - Changes file length LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
ftruncate64(2) OSS System Calls Reference Manual Use From a Threaded Application The thread-aware ftruncate64( ) function offers an alternative to the O_SYNC file status flag. Using thread-aware ftruncate64( ) gives a threaded application control over the performance trade offs involved in guaranteeing data integrity. OSS file-system caching can be used for files that are protected only by thread-aware ftruncate64( ) function calls.
System Functions (f - i) ftruncate64(2) [EFBIG] The length parameter is greater than the minimum of 2 gigabytes minus 1 byte and the maximum file size established during file open. [EINTR] The function was interrupted by a signal before any data arrived. [EINVAL] One of these conditions occurred: [EIO] • The file pointed to by the filedes parameter is not a regular file. • The value specified for the length parameter was less than 0 (zero).
getegid(2) OSS System Calls Reference Manual NAME getegid - Gets the effective group ID LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ gid_t getegid(void); DESCRIPTION The getegid( ) function returns the effective group ID of the calling process.
System Functions (f - i) geteuid(2) NAME geteuid - Gets the effective user ID of the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll 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.
getgid(2) OSS System Calls Reference Manual NAME getgid - Gets the real group ID LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include #include /* optional except for POSIX.1 */ gid_t getgid(void); DESCRIPTION The getgid( ) function returns the real group ID of the calling process.
System Functions (f - i) getgroups(2) NAME getgroups - Gets the group list of the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include #include
gethostname(2) OSS System Calls Reference Manual NAME gethostname - Gets the name of the local host LIBRARY G-series native OSS processes: /G/system/sysnn/zinetsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zinetdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yinetdll SYNOPSIS #include int gethostname( char *address, int address_len); PARAMETERS address Returns the address of an array of bytes where the hostname is stored.
System Functions (f - i) getpeername(2) NAME getpeername - Gets the name of the peer socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include int getpeername( int socket, struct sockaddr *address, socklen_t *address_len); PARAMETERS socket Specifies the open file descriptor of the socket.
getpeername(2) OSS System Calls Reference Manual AF_UNIX Release 1 or AF_UNIX Release 2 in AF_UNIX Release 2 in Compatibility Mode Portability Mode _ __________________________________________________________ After a successful call to connect( ) on a stream socket where a relative pathname is passed in the address parameter, a subsequent call to getpeername( ) returns the relative path name passed to connect( ).
System Functions (f - i) getpeername(2) • 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.
getpgid(2) OSS System Calls Reference Manual NAME getpgid - Gets the process group ID for a specified OSS process LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include pid_t getpgid( pid_t pid); PARAMETERS pid Specifies the process ID of the target process.
System Functions (f - i) getpgrp(2) 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.
getpid(2) OSS System Calls Reference Manual 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.
System Functions (f - i) getppid(2) 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.
getpriority(2) OSS System Calls Reference Manual NAME getpriority - Gets the OSS process scheduling priority LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll 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.
System Functions (f - i) getpriority(2) [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: • 527186-023 The function can return the errno value [ENOTOSS].
getsid(2) OSS System Calls Reference Manual NAME getsid - Gets the process group ID of the session leader LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries SYNOPSIS #include pid_t getsid( pid_t pid); PARAMETERS pid Specifies the OSS process ID of the target process. If the value specified is pid_t(0) (an OSS process ID of zero), the function uses the OSS process ID of the calling process.
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 and J-series OSS processes: implicit libraries SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include int getsockname( int socket, struct sockaddr *address, socklen_t *address_len); PARAMETERS socket Specifies the file descriptor of the socket.
getsockname(2) OSS System Calls Reference Manual For more information about AF_UNIX Release 2 sockets, portability mode, and compatibility mode, see the Open System Services Programmer’s Guide. On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the getsockname( ) function returns the value 0 (zero).
System Functions (f - i) 527186-023 getsockname(2) Hewlett-Packard Company 3−87
getsockopt(2) OSS System Calls Reference Manual NAME getsockopt - Gets socket options LIBRARY G-series native OSS processes: /G/system/sysnn/zinetsrl H-series and J-series OSS processes: /G/system/zdllnnn/zinetdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include [#include ] Required for IP protocol level [#include
System Functions (f - i) getsockopt(2) • -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.
getsockopt(2) OSS System Calls Reference Manual 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.
System Functions (f - i) getsockopt(2) 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.
getsockopt(2) OSS System Calls Reference Manual 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.
System Functions (f - i) getsockopt(2) [ENOTSOCK] The socket parameter does not refer to a socket. [EOPNOTSUPP] The specified operation is not supported by the protocol used by the socket. RELATED INFORMATION Functions: bind(2), close(2), endprotoent(3), getprotobynumber(3), getprotoent(3), setprotoent(3), setsockopt(2), socket(2), socketpair(2). STANDARDS CONFORMANCE The HP implementation does not: • Implement the SO_LINGER option for AF_UNIX sockets. • Return the errno value [ENOSR].
gettimeofday(2) OSS System Calls Reference Manual NAME gettimeofday - Gets date and time LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include int gettimeofday( struct timeval *tp, struct timezone *tzp); PARAMETERS tp Points to a timeval structure, defined in the sys/time.h file.
System Functions (f - i) gettimeofday(2) RETURN VALUES Upon completion, the value 0 (zero) is returned. RELATED INFORMATION Functions: ctime(3), strftime(3). Commands: date(1). STANDARDS CONFORMANCE In the HP implementation: • The tzp parameter is not a type void data item. • The tz_dsttime field is always set to 0 (zero). The following are HP extensions to the XPG4 Version 2 specification: • 527186-023 The behavior when the tzp parameter is a null pointer is specified.
getuid(2) OSS System Calls Reference Manual NAME getuid - Gets the the real user ID of the current process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll 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.
System Functions (f - i) ioctl(2) NAME ioctl - Controls device files LIBRARY G-series native OSS processes: system library H-series and J-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.
ioctl(2) OSS System Calls Reference Manual 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].
System Functions (f - i) ioctl(2) 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.
ioctl(2) OSS System Calls Reference Manual [EINVAL] The function was called for a device other than a terminal. [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node (a remote $ZTNT process), but communication with the remote node has been lost. [ENOTSUP] The request parameter specifies an operation that is not supported on the device specified by the filedes parameter.
Section 4. System Functions (k - m) This section contains reference pages for Open System Services (OSS) system function calls with names that begin with k through m. These reference pages reside in the cat2 directory and are sorted alphabetically by U.S. English conventions in this section.
kill(2) OSS System Calls Reference Manual NAME kill - Sends a signal to a process or group of processes LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int kill( pid_t pid, int signal); PARAMETERS pid Specifies the process or group of processes to be sent a signal. signal Specifies the signal.
System Functions (k - m) kill(2) The POSIX.1 standard leaves unspecified the set of system processes that does not receive a signal when the kill( ) function is called with pid equal to 0, -1, or a negative number less than -1. Applications in the HP implementation should therefore not depend on which system processes receive signals. Safeguard Considerations HP recommends that users not use Safeguard protection on OSS processes.
kill(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the kill( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, errno is set to indicate the error, and no signal is sent. ERRORS If any of the following conditions occurs, the kill( ) function sets errno to the corresponding value: [EINVAL] The value in the signal parameter is an invalid or unsupported signal number. [ENOTOSS] The calling process was not an OSS process.
System Functions (k - m) lchmod(2) NAME lchmod - Changes file-access permissions LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int lchmod( const char *path, mode_t mode); PARAMETERS path Specifies the full pathname of the file.
lchmod(2) OSS System Calls Reference Manual S_ISGID Sets the process’s effective group ID to the group ID of the file’s group on execution. S_ISVTX For a directory, permits modification to the directory only if the effective user ID of the process matches that of the file being accessed. S_IRWXU Permits the file’s owner to read, write, and execute the file (or to search the directory). S_IRUSR Permits the file’s owner to read the file. S_IWUSR Permits the file’s owner to write to the file.
System Functions (k - m) lchmod(2) Access Control Lists (ACLs) When you execute the lchmod( ) function, you can change the effective permissions granted by optional entries in the ACL for a file.
lchmod(2) OSS System Calls Reference Manual NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the lchmod( ) function returns the value 0 (zero). Otherwise, the value -1 is returned, and errno is set to indicate the error.
System Functions (k - m) lchmod(2) [ENOTDIR] A component, other than the last part, of the path parameter 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 effective user ID does not match the user ID of the owner of the file, or the owner does not have appropriate privileges.
lchown(2) OSS System Calls Reference Manual NAME lchown - Changes the owner and group IDs of a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
System Functions (k - m) lchown(2) The _POSIX_CHOWN_RESTRICTED feature is enforced for all files in the OSS file system. Only processes with appropriate privileges can change owner IDs. If the owner or group parameter is specified as -1 cast to the type of uid_t or gid_t, respectively, the corresponding ID of the file is unchanged. To change only one attribute, specify the other as -1. Upon successful completion, the lchown( ) function marks the st_ctime field of the file for update.
lchown(2) OSS System Calls Reference Manual Use From the Guardian Environment The lchown( ) function is one of a set of functions that have these effects when the first of them is called from the Guardian environment: • Two Guardian file system file numbers (not necessarily the next two available) are allocated for the root directory and the current working directory. These file numbers cannot be closed by calling the Guardian FILE_CLOSE_ procedure.
System Functions (k - m) [ENOENT] [ENOROOT] lchown(2) One of these conditions is true: • The path parameter does not exist. • 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 node, but communication with the remote node has been lost.
lchown(2) OSS System Calls Reference Manual RELATED INFORMATION Commands: chgrp(1), chown(1), getacl(1), setacl(1). Functions: acl(2), chmod(2), chown(2), fchmod(2), fchown(2), lchmod(2), setfilepriv(2). Miscellaneous topics: acl(5). STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define.
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 and J-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 to use this function on any file in a restricted-access fileset. However, Network File System (NFS) clients are not granted SOA group privileges, even if these clients are accessing the system with a user ID that is a member of the SOA security group. For more information about restricted-access filesets and file privileges, see the Open System Services Management and Operations Guide.
System Functions (k - m) link(2) [ELOOP] Too many symbolic links were encountered in translating either the path1 or path2 parameter. [EMLINK] The number of links to the file specified by the path1 parameter would exceed the maximum permitted. The pathconf( ) function can be called to obtain the configured limit.
link(2) OSS System Calls Reference Manual [EPERM] One of the following conditions occurred: • The file specified by the path1 parameter is a directory. • The call attempted to create a link in the root directory of an OSS fileset to a file called lost+found. • The call attempted to create a link to /dev/tty or /dev/null. • The program attempted an operation on a SEEP-protected fileset. Valid for J06.15 and later J-series RVUs, and H06.26 and later H-series RVUs.
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 #define _XOPEN_SOURCE_EXTENDED 1 #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 For more information about AF_UNIX Release 2 sockets, portability mode, and compatibility mode, see the Open System Services Programmer’s Guide. NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. RETURN VALUES Upon successful completion, the listen( ) function returns the value 0 (zero). Otherwise, the value -1 is returned and errno is set to indicate the error.
System Functions (k - m) 527186-023 listen(2) Hewlett-Packard Company 4−21
lseek(2) OSS System Calls Reference Manual NAME lseek - Sets file offset for read or write operation LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include
System Functions (k - m) lseek(2) NOTES To use the lseek( ) functionality in a threaded application that uses the Standard POSIX Threads library, see spt_lseekz(2). To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.
lseek(2) OSS System Calls Reference Manual [EISDIR] The filedes parameter refers to an OSS directory. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment.
System Functions (k - m) lseek64(2) NAME lseek64 - Sets file offset for read or write operation LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include
lseek64(2) OSS System Calls Reference Manual value 0 (zero) until data is actually written into the gap. The lseek64( ) function does not, by itself, extend the size of the file. Use From a Threaded Application This function serializes file operations on an open file. If a thread calls lseek64( ) to access a file that already has a file operation in progress by a different thread, this thread is blocked until the prior file operation is complete.
System Functions (k - m) [EINVAL] [EISDIR] lseek64(2) 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 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. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment.
lstat(2) OSS System Calls Reference Manual 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 and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int lstat( const char *path, struct stat *buffer); PARAMETERS path Points to the pathname of a file.
System Functions (k - m) lstat(2) int64_t st_reserved[3]; }; For J06.10 and earlier J-series RVUs and H06.21 and earlier H-series RVUs, the stat structure uses this definition from the sys/stat.
lstat(2) OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket ID of device containing directory entry ID of device containing directory ID of special fileset for pipes ID of device containing the fileset in which the socket file was created ID of device containing directory entry ID of device containing directory entry /dev/null /dev/tty st_ino File serial number (inode number).
System Functions (k - m) lstat(2) S_IRWXG Permissions for the owning group, or if the st_acl flag is set, permissions for the the class ACL entry. 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) Values for Guardian objects are described in Use on Guardian Objects, later in this reference page. st_nlink Number of links.
lstat(2) OSS System Calls Reference Manual 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 creater of the socket file Group ID of the super ID Group ID of the super ID st_basemode If the st_acl flag is set, contains the permissions for the file owner, owning group, and others. If the st_acl flag is not set, st_basemode is 0 (zero). st_rdev Remote device ID.
System Functions (k - m) lstat(2) 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 in the following table.
lstat(2) OSS System Calls Reference Manual Use on Guardian Objects You can use the lstat( ) function like the stat( ) or fstat( ) function on files in /G, but you cannot create symbolic links in /G. 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.
System Functions (k - m) lstat(2) Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text See followin
lstat(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. NOTES For J06.08 and earlier J-series RVUs, H06.
System Functions (k - m) lstat(2) • path points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The specified pathname points to the name of a Guardian process that is not of subtype 30. • The path parameter specifies a file on a remote HP NonStop node but communication with the remote node has been lost. [ENOROOT] The program attempted an operation while the root fileset was unavailable.
lstat64(2) OSS System Calls Reference Manual NAME lstat64 - 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 and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int lstat64( const char *path, struct stat64 *buffer); PARAMETERS path Points to the pathname of a file.
System Functions (k - m) lstat64(2) The file information is written to the area specified by the buffer parameter, which is a pointer to a stat64 structure. For J06.11 and later J-series RVUs and H06.22 and later H-series RVUs, the stat64 structure uses this definition from the sys/stat.
lstat64(2) OSS System Calls Reference Manual The lstat64( ) function updates any time-related fields associated with the file before writing into the stat64 structure, unless it is a read-only fileset. Time-related fields are not updated for readonly OSS filesets. The fields in the stat64 structure have the following meanings and content: st_dev OSS device identifier for a fileset. Values for local OSS objects are listed in the following table.
System Functions (k - m) lstat64(2) 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. S_IRWXG Permissions for the owning group, or if the st_acl flag is set, permissions for the the class ACL entry.
lstat64(2) st_gid OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed in the following table. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (k - m) st_atime lstat64(2) For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed in the following table. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
lstat64(2) OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Time of the last file status change Time of the last file status change Time of the last file status change Value retrieved from the inode Current time Composite value of the times of all openers of the file For the /E entry of the local node, the value is the time of the most recent mounting of the root fileset.
System Functions (k - m) lstat64(2) Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text See follow
lstat64(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. NOTES For J06.08 and earlier J-series RVUs, H06.
System Functions (k - m) lstat64(2) • path points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The specified pathname points to the name of a Guardian process that is not of subtype 30. • The path parameter specifies a file on a remote HP NonStop node but communication with the remote node has been lost. [ENOROOT] The program attempted an operation while the root fileset was unavailable.
mkdir(2) OSS System Calls Reference Manual NAME mkdir - Creates a directory LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-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) permission bits ("rwxrwxrwx") are automatically set. • The new directory is empty except for . (dot) and . . (dot-dot). To execute the mkdir( ) function, a process must have search permission for the parent directory of the directory pointed to by the path parameter and write permission in the parent directory of the path directory. The mkdir( ) function cannot create a directory named /dev, /dev/tty, or /dev/null in the root directory of the OSS file system.
mkdir(2) OSS System Calls Reference Manual NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the mkdir( ) function returns the value 0 (zero). If the function call fails, the value -1 is returned and errno is set to indicate the error.
System Functions (k - m) [ENOROOT] mkdir(2) 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.
mkdir(2) OSS System Calls Reference Manual The following are extensions to the XPG4 Version 2 specification: • 4−52 The errno values [EFAULT], [EFSBAD], [EINVAL], [EIO], [ENOROOT], [ENXIO], [EOSSNOTRUNNING], and [EPERM] can be returned.
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 and J-series native Guardian processes: implicit libraries H-series and J-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 device 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
System Functions (k - m) • mknod(2) Access permission and attribute bits set according to the value of the mode parameter, modified as described in "ACL Inheritance" in the acl(5) reference page. Upon successful completion of the function call, the st_atime, st_ctime, and st_mtime fields of the file are marked for update. The st_ctime and st_mtime fields of the directory that contains the new entry are also marked for update.
mknod(2) OSS System Calls Reference Manual When S_IFDIR is specified for the mode parameter, a specification of /G/vol for the path parameter causes the function call to fail and errno to be set to [EINVAL]. If any other file type value is used for the mode parameter of a file in /G, the function call fails and errno is set to the value of [EINVAL]. The file access permissions S_ISUID, S_ISGID, and S_ISVTX are ignored when you are creating files in the Guardian file system.
System Functions (k - m) mknod(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. [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.
mknod(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The OSS file system does not support block special files. The file type S_IFBLK is therefore not valid. The following are HP extensions to the XPG4 Version 2 specification: 4−58 • The errno values [EFAULT], [EFSBAD], [ENOROOT], [ENXIO], and [EOSSNOTRUNNING] can be returned. • Behavior is defined when values for the mode parameter other than S_IFIFO are specified.
System Functions (k - m) msgctl(2) NAME msgctl - Performs message control operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll 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. [ENOMEM] Memory allocation failed and one possibility is that the amount of memory consumed by the message queues exceeds 16GB. [ENOTOSS] The calling process is not an OSS process.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include int msgget( key_t key, int msgflg); PARAMETERS key Specifies the key that identifies the message queue.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll 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.
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 actions that the system should take: • If the IPC_NOWAIT flag is used and the queue does not contain a message of the requested type, the function call returns immediately with the value -1 and errno is set to [ENOMSG].
System Functions (k - m) msgrcv(2) However, the data type for the mtype field (long int) is a problem when 64-bit processes send and receive messages with 32-bit processes because the length of the field varies depending on whether the caller is a 32-bit or 64-bit process. This field is 32 bits for 32-bit processes and 64 bits for 64-bit processes.
msgrcv(2) OSS System Calls Reference Manual [EINTR] The operation was interrupted by a signal. [EINVAL] One of the following conditions exists: • The msqid parameter does not specify a valid message queue identifier. • 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. • Both MSG_32BIT_MTYPE and MSG_64BIT_MTYPE are specified in the msgflag parameter.
System Functions (k - m) msgsnd(2) NAME msgsnd - Sends a message to a message queue LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll 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.
msgsnd(2) OSS System Calls Reference Manual • If the IPC_NOWAIT flag is not used in the msgflg parameter the system runs out of internal buffer space, the system suspends the calling process. The process remains suspended until one of the following occurs: — The blocking condition is removed. In this case, the system sends the message. — The specified message queue identifier is removed from the system. In this case, the system sets errno to [EIDRM] and returns the value -1 to the calling process.
System Functions (k - m) msgsnd(2) 64-bit process sends a msgbuf structure that contain a 64-bit mtype field to a 32-bit process. The 32-bit process that receives the structure does not understand how to process the message because it expects this field to be only 32 bits long. Additionally, although the mtext field starts at the 65th bit of the message, the 32-bit process expects the mtype field to start at the 33rd bit of the message.
msgsnd(2) OSS System Calls Reference Manual [ENOMEM] Memory allocation failed and one possibility is that the amount of memory consumed by the message queues exceeds 16GB. [ENOTOSS] The calling process is not an OSS process. The requested operation cannot be performed from the Guardian environment. RELATED INFORMATION Functions: msgctl(2), msgget(2), msgrcv(2), sigaction(2).
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 and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include #include /* optional except for POSIX.1 */ /* optional except for POSIX.
System Functions (n - p) open(2) this process is running and on the fileset that contains the new directory. See "ACL Inheritance" in the acl(5) reference page. If a file opened for writing has file privileges such as PRIVSOARFOPEN or PRIVSETID, these file privileges are removed. Only Members of Safeguard SECURITY-PRV-ADMINISTRATOR (SEC-PRIV-ADMIN or SPA) group are permitted to explicitly set file privileges. File privileges can be set using the setfilepriv( ) function or the setfilepriv command only.
open(2) OSS System Calls Reference Manual File Status Flags The file status flags that specify special open processing are: O_CREAT Create and open the file. If the file exists, this flag has no effect except as noted under the O_EXCL flag. If the file does not exist, a regular file is created with these characteristics: • If access control lists (ACLs) are supported, ACL entries are added to the file ACL as described in "ACL Inheritance" in the acl(5) reference page.
System Functions (n - p) open(2) The open fails if any of these conditions is true: • The file supports enforced record locks, and another process has locked a portion of the file. • The file does not allow write access. • The oflag parameter also specifies the O_RDONLY flag. If the oflag parameter also specifies the O_SYNC flag, the truncation is a synchronous update. A program can request some control over when updates should be made permanent for a regular file opened for write access.
open(2) OSS System Calls Reference Manual • If the named file is not a regular file, the O_CREAT flag is ignored. When opening a FIFO file with the O_RDONLY flag set: • If the O_NONBLOCK flag is not set, the open( ) function blocks until another process opens the file for writing. If the file is already open for writing (even by the calling process), the function returns without delay. • If the O_NONBLOCK flag is set, the open( ) function returns immediately.
System Functions (n - p) open(2) Opening Guardian Files If the file is a Guardian file (that is, if it is in the /G file system): • The file can be opened only if it is: — A Format 1 file or a Format 2 file that is smaller than 2 gigabytes, on a physical disk volume, and either: — 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.
open(2) OSS System Calls Reference Manual • If the open requires file creation, the Guardian file created will be Format 1, odd, unstructured, and file code 180. • If the open requires file creation, the file is given access permissions compatible with the standard security permissions for the Guardian creator access ID (CAID) of the calling process. During open( ) processing, all access permissions are checked.
System Functions (n - p) open(2) NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. 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.
open(2) [EIO] OSS System Calls Reference Manual • The function call specified the O_CREAT flag but did not specify the mode parameter. • 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.
System Functions (n - p) open(2) • [ENOENT] The limit for open file descriptors of this file type has not been exceeded, but the maximum number of all file descriptors for this processor are already open. One of these conditions exists: • The O_CREAT flag is not set, and the named file does not exist. • O_CREAT is set, and the pathname prefix does not exist. • The path parameter points to an empty string.
open(2) OSS System Calls Reference Manual [EOSSNOTRUNNING] A required system process is not running. [EOVERFLOW] The file size is larger than approximately 2 gigabytes. [EPERM] One of these conditions exists: • The function call attempted to create a file named lost+found in the root directory of an OSS fileset. • The call attempted to create a file in /E. • The program attempted an operation on a SEEP-protected fileset. Valid for J06.15 and later J-series RVUs, and H06.26 and later H-series RVUs.
System Functions (n - p) • open(2) Specifying the O_NONBLOCK flag when opening character special devices that support nonblocking opens is supported. HP extensions to the XPG4 Version 2 specification are: 527186-023 • Opening Guardian files (that is, files in the /G file system) is supported, as described under Opening Guardian Files in DESCRIPTION. • Access control lists (ACLs) for OSS files are supported.
open64(2) OSS System Calls Reference Manual NAME open64 - 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 and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include #include /* optional except for POSIX.1 */ /* optional except for POSIX.
System Functions (n - p) open64(2) The file type flags are described in DESCRIPTION.
open64(2) OSS System Calls Reference Manual File Status Flags The file status flags that specify special open processing are: O_CREAT Create and open the file. If the file exists, this flag has no effect except as noted under the O_EXCL flag. If the file does not exist, a regular file is created with these characteristics: • If access control lists (ACLs) are supported, ACL entries are added to the file ACL as described in "ACL Inheritance" in the acl(5) reference page.
System Functions (n - p) open64(2) The open fails if any of these conditions is true: • The file supports enforced record locks, and another process has locked a portion of the file. • The file does not allow write access. • The oflag parameter also specifies the O_RDONLY flag. If the oflag parameter also specifies the O_SYNC flag, the truncation is a synchronous update. A program can request some control over when updates should be made permanent for a regular file opened for write access.
open64(2) OSS System Calls Reference Manual The effect of setting the O_CREAT flag is immediate. When opening a file with the O_CREAT flag set: • If the named file does not already exist, a regular disk file is created. • If the named file is not a regular file, the O_CREAT flag is ignored. When opening a FIFO file with the O_RDONLY flag set: • If the O_NONBLOCK flag is not set, the open64( ) function blocks until another process opens the file for writing.
System Functions (n - p) open64(2) Opening Guardian Files If the file is a Guardian file (that is, if it is in the /G file system): • The file can be opened only if it is: — A file on a physical disk volume and either: — 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.
open64(2) OSS System Calls Reference Manual (CAID) of the calling process. During open64( ) processing, all access permissions are checked. This includes Guardian environment checks by Guardian standard security mechanisms (and by the Safeguard product) for Guardian disk file and process access. Considerations for Restricted-Access Filesets See the open(2) reference page.
System Functions (n - p) open64(2) [EEXIST] The O_CREAT and O_EXCL flags are set, and the named file exists. [EFAULT] The path parameter is an invalid address. [EFILEBAD] One of these conditions exists: [EFSBAD] • The function call attempted to open a Guardian EDIT file, but the structure of the file is bad. • The function call attempted to open a Guardian EDIT file, but the corrupted flag is set in the file label.
open64(2) OSS System Calls Reference Manual • The named file is a Guardian directory (/G or a directory in the /G file system). [ELOOP] Too many symbolic links were encountered in translating the path parameter. [EMFILE] The system limit for open file descriptors per process has reached the maximum permitted.
System Functions (n - p) open64(2) [ENOSPC] The directory that would contain the new file cannot be extended, the file does not exist, and the O_CREAT flag is set. [ENOTDIR] A component of the pathname prefix is not a directory. [ENOTSUP] The path parameter specifies a Guardian file on an SMF logical volume and one of the following conditions exists: [ENXIO] • The local system is running an RVU prior to J06.15 or H06.26.
open64(2) OSS System Calls Reference Manual 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. • The O_NONBLOCK flag is ignored for regular disk files and directory files. • The O_NOCTTY flag is ignored for regular disk files and directory files.
System Functions (n - p) pipe(2) NAME pipe - Creates an interprocess communication channel LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-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.
pipe(2) OSS System Calls Reference Manual ERRORS If any of these conditions occurs, the pipe( ) function sets errno to the corresponding value: [EFAULT] The filedes parameter is an invalid address. [EMFILE] No more file descriptors are available for this process. [ENFILE] One of these conditions exists: • The maximum number of file descriptors of this file type (socket, pipe, etc.) for this processor are already open.
System Functions (n - p) pthread_atfork(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the S
pthread_atfork(2) OSS System Calls Reference Manual handler just unlocks those mutexes. The child handler also unlocks them all — and might also create threads or reset any program state for the child process. If no fork handling is desired, you can set any of this function’s parameters to NULL. On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded applications.
System Functions (n - p) pthread_atfork(2) { 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); . . fork(); } NOTES Do not call pthread_atfork( ) from within a fork-handler routine. Doing so could cause a deadlock.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zd
System Functions (n - p) pthread_attr_destroy(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
pthread_attr_getdetachstate(2) OSS System Calls Reference Manual NAME pthread_attr_getdetachstate - Obtains the detachstate attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the St
System Functions (n - p) pthread_attr_getdetachstate(2) To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
pthread_attr_getguardsize(2) OSS System Calls Reference Manual NAME pthread_attr_getguardsize - Obtains the guardsize attribute of a thread attributes object LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (n - p) pthread_attr_getguardsize(2) • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the St
pthread_attr_getinheritsched(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (n - p) pthread_attr_getschedparam(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS p
pthread_attr_getschedparam(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Stand
pthread_attr_getschedpolicy(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (n - p) pthread_attr_getscope(2) NAME pthread_attr_getscope - Gets the contentionscope attribute of a thread attributes object LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
pthread_attr_getscope(2) OSS System Calls Reference Manual • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). NOTES The POSIX User Thread Model library supports only the PTHREAD_SCOPE_PROCESS value for the contentionscope parameter.
System Functions (n - p) pthread_attr_getstackaddr(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use t
pthread_attr_getstackaddr(2) OSS System Calls Reference Manual • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Th
pthread_attr_getstacksize(2) OSS System Calls Reference Manual • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
System Functions (n - p) pthread_attr_init(2) NAME pthread_attr_init - Initializes a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdl
pthread_attr_init(2) OSS System Calls Reference Manual pthread_attr_setinheritsched( ) function to specify the value PTHREAD_INHERIT_SCHED for the inherit parameter. On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded applications. To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.
System Functions (n - p) pthread_attr_init(2) [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. RELATED INFORMATION Functions: pthread_attr_destroy(2), pthread_attr_setdetachstate(2), pthread_attr_setguardsize_np(2), pthread_attr_setinheritsched(2), pthread_attr_setschedparam(2), pthread_attr_setschedpolicy(2), pthread_attr_setstacksize(2), pthread_create(2).
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Stand
System Functions (n - p) pthread_attr_setdetachstate(2) To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
pthread_attr_setdetachstate(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1-2004, 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_attr_setguardsize(2) NAME pthread_attr_setguardsize - Sets the guardsize attribute of a thread attributes object LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include int pthread_attr_setguardsize( pthread_attr_t *attr, size_t guardsize); PARAMETERS attr Specifies the address of the thread attributes object whose guardsize attribute is to be set.
pthread_attr_setguardsize(2) OSS System Calls Reference Manual • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
System Functions (n - p) pthread_attr_setguardsize_np(2) 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.
pthread_attr_setguardsize_np(2) [EINVAL] OSS System Calls Reference Manual 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: • 5−60 IEEE Std 1003.
System Functions (n - p) pthread_attr_setinheritsched(2) NAME pthread_attr_setinheritsched - Sets the inherit scheduling attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Stand
pthread_attr_setinheritsched(2) OSS System Calls Reference Manual To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
System Functions (n - p) pthread_attr_setinheritsched(2) STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1-2004, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series
System Functions (n - p) SCHED_RR pthread_attr_setschedparam(2) PRI_RR_MIN to PRI_RR_MAX SCHED_OTHER PRI_OTHER_MIN to PRI_OTHER_MAX 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. On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded applications.
pthread_attr_setschedparam(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 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. [ENOTSUP] An attempt was made to set the attribute to an unsupported value.
System Functions (n - p) pthread_attr_setschedpolicy(2) NAME pthread_attr_setschedpolicy - Sets the scheduling policy attribute of a thread attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard
pthread_attr_setschedpolicy(2) OSS System Calls Reference Manual of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
System Functions (n - p) pthread_attr_setscope(2) NAME pthread_attr_setscope - Sets the contentionscope attribute of a thread attributes object LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
pthread_attr_setscope(2) OSS System Calls Reference Manual • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). NOTES The POSIX User Thread Model library supports only the PTHREAD_SCOPE_PROCESS value for the contentionscope parameter.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threa
pthread_attr_setstacksize(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (n - p) pthread_cancel(2) NAME pthread_cancel - Requests that a thread terminate execution LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll
pthread_cancel(2) OSS System Calls Reference Manual following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
System Functions (n - p) pthread_cancel(2) The use of the header file spthread.h is an HP exception to the POSIX standard.
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 | #include /* pthread.h is required to use POSIX User Thread Model library */ /* spthread.
System Functions (n - p) pthread_cleanup_pop(2) • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option. RELATED INFORMATION Functions: pthread_cancel(2), pthread_cleanup_push(2), pthread_create(2), pthread_exit(2). STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
pthread_cleanup_push(2) OSS System Calls Reference Manual 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 | #include /* pthread.h is required to use POSIX User Thread Model library */ /* spthread.
System Functions (n - p) pthread_cleanup_push(2) RELATED INFORMATION Functions: pthread_cancel(2), pthread_cleanup_pop(2), pthread_create(2), pthread_exit(2), pthread_testcancel(2). STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1-2004, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads l
System Functions (n - p) pthread_condattr_destroy(2) • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
pthread_condattr_init(2) OSS System Calls Reference Manual NAME pthread_condattr_init - Initializes a condition variable attributes object LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads libr
System Functions (n - p) • pthread_condattr_init(2) Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications. To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the St
System Functions (n - p) pthread_cond_broadcast(2) To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
pthread_cond_destroy(2) OSS System Calls Reference Manual NAME pthread_cond_destroy - Destroys a condition variable LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/
System Functions (n - p) pthread_cond_destroy(2) • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsp
System Functions (n - p) pthread_cond_init(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
pthread_cond_init(2) OSS System Calls Reference Manual [EINVAL] The value specified by the attr parameter is invalid. [ENOMEM] Insufficient memory exists to initialize the condition variable. RELATED INFORMATION Functions: pthread_cond_broadcast(2), pthread_cond_destroy(2), pthread_cond_signal(2), pthread_cond_timedwait(2), pthread_cond_wait(2). STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (n - p) pthread_cond_signal(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard P
pthread_cond_signal(2) OSS System Calls Reference Manual To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-ser
pthread_cond_signal_int_np(2) OSS System Calls Reference Manual To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.
System Functions (n - p) pthread_cond_timedwait(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-
pthread_cond_timedwait(2) OSS System Calls Reference Manual Reference Manual). Your code should check the return status whenever this function returns and take the appropriate action. Otherwise, waiting on the condition variable can become a nonblocking loop. Call this function after you have locked the mutex specified by mutex. The results of this function are unpredictable if this function is called before the mutex is locked. On systems running H06.21 or later H-series RVUs or J06.
System Functions (n - p) [EINVAL] [ENOMEM] pthread_cond_timedwait(2) One of the following conditions exists: • 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. • 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_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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use t
System Functions (n - p) pthread_cond_wait(2) To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
pthread_cond_wait(2) OSS System Calls Reference Manual • [ENOMEM] 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. RELATED INFORMATION Functions: pthread_cond_broadcast(2), pthread_cond_destroy(2), pthread_cond_init(2), pthread_cond_signal(2), pthread_cond_timedwait(2).
System Functions (n - p) pthread_create(2) NAME pthread_create - Creates a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPSIS #include
pthread_create(2) • OSS System Calls Reference Manual An executable thread is created with attributes specified by the attr parameter (or with default attributes if attr is NULL). Thread Creation The system creates a thread in the ready state and prepares the thread to begin executing its start routine, which is the function passed to pthread_create( ) as the start_routine parameter.
System Functions (n - p) pthread_create(2) normally and the start routine does not provide a return value, the results obtained by joining with that thread are unpredictable. • If the termination results from a cancelation request or a call to pthread_exit( ), the system calls, in turn, each cleanup handler that this thread declared using the pthread_cleanup_push( ) macro that has not yet been removed using the pthread_cleanup_pop( ) macro.
pthread_create(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (n - p) pthread_delay_np(2) NAME pthread_delay_np - Delays execution of a thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPSIS
pthread_delay_np(2) OSS System Calls Reference Manual H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPSIS
pthread_detach(2) OSS System Calls Reference Manual of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.
System Functions (n - p) pthread_equal(2) NAME pthread_equal - Compares two thread identifiers LIBRARY None. This routine has been implemented as a macro. SYNOPSIS #include | #include /* pthread.h is required to use POSIX User Thread Model library */ /* spthread.h is required to use Standard POSIX Threads library */ int pthread_equal( pthread_t t1, pthread_t t2); PARAMETERS t1 Specifies the first thread identifier to be compared.
pthread_equal(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1-2004, 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_exit(2) NAME pthread_exit - Terminates the calling thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPSIS #includ
pthread_exit(2) OSS System Calls Reference Manual To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zspt
pthread_getattr_np(2) OSS System Calls Reference Manual • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
System Functions (n - p) pthread_getconcurrency(2) NAME pthread_getconcurrency - Gets level of concurrency LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll S
pthread_getconcurrency(2) OSS System Calls Reference Manual • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
System Functions (n - p) pthread_get_expiration_np(2) NAME pthread_get_expiration_np - Calculates an absolute expiration time LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/syste
pthread_get_expiration_np(2) OSS System Calls Reference Manual H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard PO
pthread_getschedparam(2) • OSS System Calls Reference Manual Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications. To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/s
pthread_getspecific(2) OSS System Calls Reference Manual • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
System Functions (n - p) pthread_get_threadstateinfo_np(2) NAME pthread_get_threadstateinfo_np - Gets the thread state information LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/
pthread_get_threadstateinfo_np(2) OSS System Calls Reference Manual To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.
System Functions (n - p) pthread_join(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/syst
pthread_join(2) OSS System Calls Reference Manual • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
System Functions (n - p) pthread_join(2) 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/syste
System Functions (n - p) pthread_key_create(2) been called for all non-NULL values with associated destructor routines, if some non-NULL values with associated destructor routines still exist, then this sequence of actions is repeated. This sequences is repeated up to PTHREAD_DESTRUCTOR_ITERATIONS times. If, after all allowed repetitions of this sequence, non-NULL values for any key with a destructor routine exist, the system terminates the thread.
pthread_key_create(2) OSS System Calls Reference Manual [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. RELATED INFORMATION Functions: pthread_getspecific(2), pthread_key_delete(2), pthread_once(2), pthread_setspecific(2).
System Functions (n - p) pthread_key_delete(2) NAME pthread_key_delete - Deletes a thread-specific data key LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll
pthread_key_delete(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPSIS #include <
pthread_kill(2) OSS System Calls Reference Manual Specifying a sig value of 0 (zero) causes this function to validate the thread parameter but not to send any signal. If this function does not execute successfully, no signal is sent. On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded applications.
System Functions (n - p) pthread_kill(2) [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: pthread_sigmask(2), sigaction(2), spt_alarm(2), spt_sigaction(2), spt_signal(2), spt_sigpending(2), spt_sigsuspend(2), spt_sigwait(2). Files: signal(4). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification.
pthread_kill_np(2) OSS System Calls Reference Manual NAME pthread_kill_np - Cancels a thread if a specified signal is received LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/syst
System Functions (n - p) pthread_kill_np(2) To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
pthread_lock_global_np(2) OSS System Calls Reference Manual NAME pthread_lock_global_np - Locks the global mutex for threads LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system
System Functions (n - p) pthread_lock_global_np(2) tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/
System Functions (n - p) pthread_mutexattr_destroy(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
pthread_mutexattr_getkind_np(2) OSS System Calls Reference Manual 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.
System Functions (n - p) pthread_mutexattr_gettype(2) NAME pthread_mutexattr_gettype - Gets the mutex type attribute of a mutex attribute object LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
pthread_mutexattr_gettype(2) OSS System Calls Reference Manual To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
System Functions (n - p) pthread_mutexattr_gettype(2) STANDARDS CONFORMANCE This function conforms to the following industry standards: • 527186-023 IEEE Std 1003.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/sys
System Functions (n - p) pthread_mutexattr_init(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
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-023 IEEE Std 1003.
pthread_mutexattr_settype(2) OSS System Calls Reference Manual NAME pthread_mutexattr_settype - Sets the mutex type attribute of a mutex attribute object LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (n - p) pthread_mutexattr_settype(2) To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYN
System Functions (n - p) pthread_mutex_destroy(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
pthread_mutex_init(2) OSS System Calls Reference Manual NAME pthread_mutex_init - Initializes a mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPS
System Functions (n - p) pthread_mutex_init(2) H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option.
pthread_mutex_lock(2) OSS System Calls Reference Manual NAME pthread_mutex_lock - Locks an unlocked mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SY
System Functions (n - p) pthread_mutex_lock(2) To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that us
System Functions (n - p) pthread_mutex_trylock(2) To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
pthread_mutex_unlock(2) OSS System Calls Reference Manual NAME pthread_mutex_unlock - Unlocks a mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll SYNOPS
System Functions (n - p) • pthread_mutex_unlock(2) Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications. To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system
System Functions (n - p) pthread_once(2) On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications. To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.
pthread_self(2) OSS System Calls Reference Manual NAME pthread_self - Obtains the thread identifier of the calling thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zd
System Functions (n - p) pthread_self(2) following tasks: • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library
System Functions (n - p) pthread_setcancelstate(2) To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /
System Functions (n - p) • pthread_setcanceltype(2) Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications. To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
pthread_setcanceltype(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: pthread_cancel(2), pthread_setcancelstate(2), pthread_testcancel(2). STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1-2004, 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.
System Functions (n - p) pthread_setconcurrency(2) NAME pthread_setconcurrency - Sets level of concurrency LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/system/zdllnnn/zsptdll S
pthread_setconcurrency(2) OSS System Calls Reference Manual • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads
pthread_setschedparam(2) OSS System Calls Reference Manual • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use the POSIX User Thread Model library with 32-bit or 64-bit threaded applications.
System Functions (n - p) [ESRCH] pthread_setschedparam(2) 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). STANDARDS CONFORMANCE Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1-2004, POSIX System Application Program Interface with the following exception: • [EPERM] is not returned.
pthread_setspecific(2) OSS System Calls Reference Manual NAME pthread_setspecific - Sets the thread-specific data associated with a key LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library
System Functions (n - p) pthread_setspecific(2) H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/sy
System Functions (n - p) pthread_sigmask(2) To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
pthread_signal_to_cancel_np(2) OSS System Calls Reference Manual NAME pthread_signal_to_cancel_np - Cancels a thread if a specified signal is received LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX
System Functions (n - p) pthread_signal_to_cancel_np(2) To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard PO
System Functions (n - p) pthread_testcancel(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
pthread_unlock_global_np(2) OSS System Calls Reference Manual NAME pthread_unlock_global_np - Unlocks the threads global mutex LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads library: /G/syst
System Functions (n - p) pthread_unlock_global_np(2) • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
put_awaitio(2) OSS System Calls Reference Manual NAME put_awaitio - Awaits a tagged I/O file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_awaitio( const short filenum, const long tag, const long timelimit, long *count_transferred, int *error, void *userdata); PARAMETERS filenum Specifies Guardian file number being waited on.
System Functions (n - p) put_awaitio(2) To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
PUT_CANCEL(2) OSS System Calls Reference Manual NAME PUT_CANCEL - Cancels the oldest incomplete operation on a Guardian file opened for nowait I/O LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) Considerations Queue files PUT_CANCEL(2) If a PUT_READUPDATELOCKX( ) function operation is canceled using the PUT_CANCEL( ) function, the PUT_READUPDATELOCKX( ) call might already have deleted a record from the queue file, which could result in the loss of a record from the queue file.
PUT_CONTROL(2) OSS System Calls Reference Manual NAME PUT_CONTROL - Performs device-dependent input/output operations LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_CONTROL(2) The following considerations apply to use on magnetic tapes: When device is not ready If a magnetic tape rewind is performed concurrently with application program execution (that is, a rewind operation other than 6), any attempt to perform a read, write, or control operation to the rewinding tape unit while rewind is taking place results in an error indication. A subsequent call to the FILE_GETINFO_ or FILEINFO procedure shows that an error 100 occurred.
PUT_CONTROL(2) • OSS System Calls Reference Manual Link the application to the yputdll library (/G/system/zdllnnn/yputdll). RETURN VALUES The PUT_CONTROL( ) function returns 0 (zero) upon successful completion. Otherwise, this function returns a nonzero Guardian file-system error number that indicates the outcome of the operation. When device handlers do not allow the operation, Guardian file-system error 2 is returned.
System Functions (n - p) put_fd_read_ready(2) NAME put_fd_read_ready - Waits on read-ready file descriptor LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include int put_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.
put_fd_read_ready(2) OSS System Calls Reference Manual [EINVAL] Invalid function argument. [EBADF] File descriptor not open for reading or closed while being waited on. [ENOTSUP] Operation not supported on file descriptor. [ETIMEDOUT] The timeout has occurred.
System Functions (n - p) put_fd_write_ready(2) NAME put_fd_write_ready - Waits on write-ready file descriptor LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include int put_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.
put_fd_write_ready(2) OSS System Calls Reference Manual [EINTR] A signal was received via pthread_kill( ) and is not blocked, ignored, or handled. [EINVAL] Invalid function argument. [EBADF] File descriptor was not open for writing or was closed while being waited on. [ENOTSUP] Operation was not supported on file descriptor. [ETIMEDOUT] timeout has occurred.
System Functions (n - p) PUT_FILE_CLOSE_(2) NAME PUT_FILE_CLOSE_ - Closes an open Guardian file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include short PUT_FILE_CLOSE_( short filenum, short tape_disposition); PARAMETERS filenum Specifies the file number of a Guardian file open instance that identifies the file to be closed.
PUT_FILE_CLOSE_(2) OSS System Calls Reference Manual To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (n - p) PUT_FILE_OPEN_(2) NAME PUT_FILE_OPEN_ - Establishes a communication path between an application process and a file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_FILE_OPEN_(2) OSS System Calls Reference Manual 1 Read only 2 Write only 3 Extend (supported only for tape) The default is 0 (zero). exclusion Specifies the desired mode of compatibility with other openers of the file. Valid values are: 0 Shared 1 Exclusive 2 Process exclusive 3 Protected The default is 0 (zero). nowait_depth Specifies the number of nowait I/O operations that can be in progress for the file concurrently with other processing.
System Functions (n - p) process pair PUT_FILE_OPEN_(2) Specifies whether an I/O operation is automatically redirected to the backup process if the primary process or its processor module fails. For processes, this parameter is called sync depth. The process determines the maximum value. The value must be at least 1 for an I/O operation to a remote process pair to recover from a network failure.
PUT_FILE_OPEN_(2) OSS System Calls Reference Manual 10 Open an OSS file by its OSS pathname. Specifies that the file to be opened is identified by the pathname parameter. 11 Reserved; specify 0 (zero). 12 No transactions. For $RECEIVE, messages are not to include transaction identifiers. This bit must be 0 (zero) if bit 15 is 1. 13 Internationalization locale support. For $RECEIVE, data messages include internationalization locale information. This bit must be 0 (zero) if bit 15 is 1.
System Functions (n - p) PUT_FILE_OPEN_(2) primary_processhandle Indicates that the caller is requesting a backup open and specifies the process handle of the primary process that already has the file open when its backup attempts to open the file. If this parameter is supplied and not null (a null process handle has -1 in each word), filenum must contain the filenum value that was returned to the primary. If a null process handle is supplied, or the parameter is omitted, a normal open is being requested.
PUT_FILE_OPEN_(2) • OSS System Calls Reference Manual Link the application to the yputdll library (/G/system/zdllnnn/yputdll). General Considerations File numbers File numbers are unique within a process. The lowest file number is 0 (zero) and is reserved for $RECEIVE; the remaining file numbers start at 1. The lowest available file number is always assigned, except in the case of backup opens. When a file is closed, its file number becomes available for a subsequent file open to use.
System Functions (n - p) PUT_FILE_OPEN_(2) $RECEIVE One open per process is permitted. Other Varies by subsystem. Specifying a nowait_depth value greater than 0 (zero) causes all I/O operations to be performed in a nowait manner. Nowait I/O operations must be completed by a call to the AWAITIOX procedure. Nowait I/O operations on different file numbers (even if for the same file) are independent, might arrive in any order at the destination, and might be completed by AWAITIOX in any order.
PUT_FILE_OPEN_(2) OSS System Calls Reference Manual • If you supply a process file name that includes a sequence number, the process must have a matching sequence number or the open fails with error 14. When retrying I/O on a process opened under such a name, the file system does not attempt to send messages to a possible backup process of the same name unless it has a matching sequence number. This behavior ensures that the named process is a true backup of the primary process.
System Functions (n - p) PUT_FILE_OPEN_(2) G 1 A 0 Member of owner’s group (local) Any user (local) For a given access mode, the accessor’s security level is checked against the file security level. File access is allowed or not allowed as shown in the following table. In this table, file security levels are indicated by FUP security codes. For a given accessor security level, a Y indicates that access is allowed to a file with the security level shown; an X indicates that access is not allowed.
PUT_FILE_OPEN_(2) OSS System Calls Reference Manual Protected exclusion mode Protected exclusion mode has meaning only for disk files. For other files, specifying protected exclusion mode is equivalent to specifying shared exclusion mode. Disk File Considerations Maximum number of concurrent nowait operations The maximum number of concurrent nowait operations permitted for an open of a disk file is 1.
System Functions (n - p) PUT_FILE_OPEN_(2) Current-state indicators after an open After successful completion of an open, the current-state indicators have these values: • The current position is that of the first record in the file by primary key. • The positioning mode is approximate. • The comparison length is 0.
PUT_FILE_OPEN_(2) OSS System Calls Reference Manual not complete until process B opens $RECEIVE. Specifically, the open by process A completes as follows: — When process B opens $RECEIVE with file-management system messages disabled, a waited open by process A completes immediately, but a nowait open by process A completes after the first read of $RECEIVE by process B.
System Functions (n - p) PUT_FILE_OPEN_(2) DEFINE Considerations • The filename or pathname parameter can be a DEFINE name; PUT_FILE_OPEN_( ) uses the file name given by the DEFINE as the name of the object to be opened. If you specify a CLASS TAPE DEFINE without the DEVICE attribute, the system selects the tape drive to be opened. A CLASS TAPE DEFINE has other effects when supplied to PUT_FILE_OPEN_( ). For more information about DEFINEs, see Appendix E of the Guardian Procedure Calls Reference Manual.
PUT_FILE_WRITEREAD_(2) OSS System Calls Reference Manual NAME PUT_FILE_WRITEREAD_ - Writes data to a process previously opened from an array and waits for data to be transferred back from the process LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_FILE_WRITEREAD_(2) I/O completes with a call to AWAITIOX. For programming information about the FILE_WRITEREAD_ and FILE_WRITEREAD64_ procedures, see the Enscribe Programmer’s Guide and the Guardian Programmer’s Guide. You can use this function with 32-bit applications or 64-bit applications on systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs.
PUT_FILE_WRITEREAD_(2) OSS System Calls Reference Manual Location of write_buffer, read_buffer, and count_read The buffers and count transferred can be in the user stack or in an extended data segment. The write_buffer, read_buffer, and count_read cannot be in the user code space. If the write_buffer, read_buffer, and count_read are in a selectable extended data segment, the segment must be in use at the time of the call. Flat segments allocated by a process are always accessible to the process.
System Functions (n - p) put_generateTag(2) NAME put_generateTag - Increments and returns a static long tag LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include long put_generateTag(void); PARAMETERS None. DESCRIPTION Increments and returns a static long string appropriate for use as a tag.
put_getTMFConcurrentTransactions(2) OSS System Calls Reference Manual NAME put_getTMFConcurrentTransactions - Gets the number of concurrent TMF transactions being used LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include int put_getTMFConcurrentTransactions(void); PARAMETERS None. DESCRIPTION This function gets the number of concurrent TMF transactions being used.
System Functions (n - p) put_INITRECEIVE(2) NAME put_INITRECEIVE - Registers $RECEIVE filename LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include long put_INITRECEIVE( const short filenum, const short receive_depth); PARAMETERS filenum Specifies Guardian file number whose IO has completed.
put_INITRECEIVE(2) 5−218 OSS System Calls Reference Manual 29 $RECEIVE was already registered prior to this call. 29 FILE_COMPLETE_SET_( ) addition of $RECEIVE returned nonzero. 29 Value for filenum not 0.
System Functions (n - p) put_INITRECEIVEL(2) NAME put_INITRECEIVEL - Registers $RECEIVE filename (larger message version) LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include long put_INITRECEIVEL( const short filenum, const short receive_depth); PARAMETERS filenum Specifies Guardian file number whose IO has completed.
put_INITRECEIVEL(2) OSS System Calls Reference Manual NOTES This function is supported on systems running J06.10 and later J-series RVUs and H06.21 and later H-series RVUs, and must be used instead of the put_INITRECEIVE( ) function when the messages are larger than 32 kilobytes. This function also can be used for shorter messages. RETURN VALUES See the put_INITRECEIVE(2) reference page.
System Functions (n - p) put_interrupt(2) NAME put_interrupt - Interrupts all threads awaiting input or output LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_interrupt( const short filenum, const put_error_t errorPUT); PARAMETERS filenum Specifies the Guardian file number for the file whose awaiting I/O is to be interrupted.
put_interrupt(2) OSS System Calls Reference Manual RETURN VALUES PUT_SUCCESS The file number awaiting I/O (if any) was interrupted. PUT_ERROR Either the value specified for error_PUT is invalid or the value for filenum is less than 0 (zero) or is not registered.
System Functions (n - p) put_interruptTag(2) NAME put_interruptTag - Interrupts thread awaiting tagged I/O LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_interruptTag( const short filenum, const long tag, const put_error_t error_PUT); PARAMETERS filenum Specifies the Guardian file number for the file whose awaiting I/O is to be interrupted.
put_interruptTag(2) OSS System Calls Reference Manual RETURN VALUES PUT_SUCCESS Awaiting IO was interrupted.
System Functions (n - p) PUT_LOCKFILE(2) NAME PUT_LOCKFILE - Excludes other users from accessing a Guardian disk file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include short PUT_LOCKFILE( short filenum, long tag); PARAMETERS filenum Specifies the file number of a Guardian disk file open instance that identifies the file to be locked.
PUT_LOCKFILE(2) OSS System Calls Reference Manual To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application.
System Functions (n - p) PUT_LOCKFILE(2) For nonaudited files, a deadlock condition (a permanent suspension of your application) occurs if PUT_READX( ) or PUT_READUPDATEX( ) is called by the process that has a record locked with a file number other than that supplied in the PUT_READX( ) or PUT_READUPDATEX( ) call. For an explanation of multiple opens by the same process, see the PUT_FILE_OPEN_(2) reference page either online or in the Open System Services System Calls Reference Manual.
PUT_LOCKREC(2) OSS System Calls Reference Manual NAME PUT_LOCKREC - Excludes other users from accessing a record in a Guardian disk file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_LOCKREC(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit applications. To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.
PUT_LOCKREC(2) OSS System Calls Reference Manual Attempting to read a locked record in default locking mode If the default locking mode is in effect when PUT_READX( ) or PUT_READUPDATEX( ) is called for a record that is locked by another user, the caller to PUT_READX( ) or PUT_READUPDATEX( ) is suspended and queued in the locking queue behind other users attempting to lock or read the record. (Another user means another open filenum if the file is not audited, or another TRANSID if the file is audited.
System Functions (n - p) PUT_LOCKREC(2) Record pointers after a call to PUT_LOCKREC( ) After a call to PUT_LOCKREC( ), the current-record, nextrecord, and end-of-file pointers remain unchanged. Ways to avoid or resolve deadlocks One way to avoid deadlock is to call function 4 of the PUT_SETMODE( ) procedure to establish one of the alternate locking modes. A common method of avoiding deadlock situations is to lock records in some predetermined order.
PUT_READLOCKX(2) OSS System Calls Reference Manual NAME PUT_READLOCKX - Sequentially locks and reads records in a Guardian disk file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_READLOCKX(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library. On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit applications. To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.
PUT_READLOCKX(2) OSS System Calls Reference Manual Location of buffer and count_read The buffer and count transferred can be in the user stack or in an extended data segment. The buffer and count_read cannot be in the user code space. If the buffer and count_read is in a selectable extended data segment, the segment must be in use at the time of the call. Flat segments allocated by a process are always accessible to the process.
System Functions (n - p) PUT_READLOCKX(2) and Messages Manual. ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: PUT_CANCEL(2), PUT_CONTROL(2), PUT_FILE_CLOSE_(2), PUT_FILE_OPEN_(2), PUT_LOCKFILE(2), PUT_LOCKREC(2), PUT_READUPDATELOCKX(2), PUT_READUPDATEX(2), PUT_READX(2), PUT_SETMODE(2), PUT_UNLOCKFILE(2), PUT_UNLOCKREC(2), PUT_WRITEREADX(2), PUT_WRITEUPDATEUNLOCKX(2), PUT_WRITEUPDATEX(2), PUT_WRITEX(2).
PUT_READUPDATELOCKX(2) OSS System Calls Reference Manual NAME PUT_READUPDATELOCKX - Allows random processing of records in a Guardian disk file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_READUPDATELOCKX(2) To use this function on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library. On systems running H06.24 or later H-series RVUs or J06.
PUT_READUPDATELOCKX(2) OSS System Calls Reference Manual Location of buffer and count_read The buffer and count transferred can be in the user stack or in an extended data segment. The buffer and count_read cannot be in the user code space. If the buffer and count_read is in a selectable extended data segment, the segment must be in use at the time of the call. Flat segments allocated by a process are always accessible to the process.
System Functions (n - p) PUT_READUPDATELOCKX(2) ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: PUT_CANCEL(2), PUT_CONTROL(2), PUT_FILE_CLOSE_(2), PUT_FILE_OPEN_(2), PUT_LOCKFILE(2), PUT_LOCKREC(2), PUT_READLOCKX(2), PUT_READUPDATEX(2), PUT_READX(2), PUT_SETMODE(2), PUT_UNLOCKFILE(2), PUT_UNLOCKREC(2), PUT_WRITEREADX(2), PUT_WRITEUPDATEUNLOCKX(2), PUT_WRITEUPDATEX(2), PUT_WRITEX(2).
PUT_READUPDATEX(2) OSS System Calls Reference Manual NAME PUT_READUPDATEX - Reads data from a Guardian disk or process file in anticipation of a subsequent write to the file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) Queue Files PUT_READUPDATEX(2) PUT_READUPDATEX( ) is not supported on queue files. An attempt to use PUT_READUPDATEX( ) is rejected with Guardian file-system error 2. Interprocess communication PUT_READUPDATEX( ) reads a message from the $RECEIVE file that is answered in a later call to the Guardian REPLYX procedure. Each message read by PUT_READUPDATEX( ) must be replied to in a corresponding call to REPLYX.
PUT_READUPDATEX(2) OSS System Calls Reference Manual Calling PUT_READUPDATEX( ) after PUT_READX( ) A call to PUT_READUPDATEX( ) after a call to PUT_READX( ), without intermediate positioning, returns the same record as the call to PUT_READX( ). Waited PUT_READUPDATEX( ) If a waited PUT_READUPDATEX( ) call is executed, the count_read parameter indicates the number of bytes actually read.
System Functions (n - p) PUT_READX(2) NAME PUT_READX - Returns data from an open Guardian file to the application process data area LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_READX(2) OSS System Calls Reference Manual • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Link the application to the zputdll library. On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit applications. To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.
System Functions (n - p) PUT_READX(2) Read call when alternate locking mode is in effect If the alternate locking mode is in effect when PUT_READX( ) is called, and the file or record is locked through a Guardian file number other than that supplied in the call, the call is rejected with Guardian file-system error 73 (file is locked). Locking mode for read The locking mode is specified by PUT_SETMODE( ) function 4.
PUT_READX(2) Queue files OSS System Calls Reference Manual You can use PUT_READX( ) to perform a nondestructive read of a queue file record. If the Guardian KEYPOSITIONX procedure is used to position to the beginning of the file, the first PUT_READX( ) call performed returns a record with a length of 8 bytes and contents of all zeros. Subsequent PUT_READX( ) calls return data from records written to the file.
System Functions (n - p) PUT_READX(2) Reading of an exact subset of records If an exact subset is being read, the only records returned are those whose key field, as designated by the current-key specifier, contains a value of exactly the comparison length bytes (see the Guardian KEYPOSITION procedure in the Guardian Procedure Calls Reference Manual) and is equal to the key. When the current key no longer matches, an EOF indication returns.
PUT_READX(2) OSS System Calls Reference Manual count_read for unstructured reads After a successful call to PUT_READX( ) for an unstructured file, the value returned in count_read is the minimum of read_count or the EOF pointer minus the next-record pointer. Pointers after PUT_READX( ) call After a successful PUT_READX( ) call to an unstructured file, the file pointers are: • Current-record pointer is old next-record pointer. • Next-record pointer is old next-record pointer plus count_read.
System Functions (n - p) put_RECEIVEREAD(2) NAME put_RECEIVEREAD - Initiates thread-aware function for reading $RECEIVE LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
put_RECEIVEREAD(2) OSS System Calls Reference Manual On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit applications. To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit application on systems running H06.
System Functions (n - p) put_RECEIVEREADL(2) NAME put_RECEIVEREADL - Initiates thread-aware function for reading $RECEIVE (larger message version) LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
put_RECEIVEREADL(2) OSS System Calls Reference Manual To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application.
System Functions (n - p) put_regFile(2) NAME put_regFile - Registers the file number LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_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.
put_regFileIOHandler(2) OSS System Calls Reference Manual NAME put_regFileIOHandler - Registers the file number LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_regFileIOHandler( const short filenum, const put_FileIOHandler_p functionPtr); PARAMETERS filenum Specifies the Guardian file number for the file being registered.
System Functions (n - p) put_regFileIOHandler(2) PUT_ERROR The value specified for filenum was less than 0 (zero). PUT_ERROR filenum was already registered prior to this call. PUT_ERROR The FILE_COMPLETE_SET_ procedure addition of filenum returned a nonzero value. PUT_ERROR functionPtr is NULL.
put_regOSSFileIOHandler(2) OSS System Calls Reference Manual NAME put_regOSSFileIOHandler - Registers the file descriptor to manage through a callback function LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (n - p) put_regOSSFileIOHandler(2) PUT_ERROR The specified filedes was less than 0 (zero). PUT_ERROR filedes was already registered prior to this call. PUT_ERROR functionPtr is NULL.
put_regPathsendFile(2) OSS System Calls Reference Manual NAME put_regPathsendFile - Registers the Pathsend file number LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (n - p) put_regPathsendFile(2) PUT_ERROR The specified Pathsend file number is already registered.
put_regPathsendTagHandler(2) OSS System Calls Reference Manual NAME put_regPathsendTagHandler - Registers the user-supplied Pathsend tag LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_regPathsendTagHandler( const long tag, put_FileIOHandler_p callback, void * userdata ); PARAMETERS tag Specifies the Pathsend tag that should be registered.
System Functions (n - p) put_regPathsendTagHandler(2) To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application.
put_regTimerHandler(2) OSS System Calls Reference Manual NAME put_regTimerHandler - Registers a user-supplied timer callback function LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_regTimerHandler( const put_TimerHandler_p functionPtr); PARAMETERS functionPtr Specifies the user-supplied callback function; this function must not block I/O.
System Functions (n - p) put_REPLYX(2) NAME put_REPLYX - Initiates thread-aware REPLYX procedure call LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include long put_REPLYX( const char *buffer, const short write_count, short *count_written, const short msg_tag, const short error_return); PARAMETERS buffer Specifies data buffer.
put_REPLYX(2) • OSS System Calls Reference Manual Link the application to the yputdll library (/G/system/zdllnnn/yputdll). RETURN VALUES This function returns a Guardian file-system error number.
System Functions (n - p) put_REPLYXL(2) NAME put_REPLYXL - Initiates thread-aware REPLYXL procedure call (larger message version) LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include long put_REPLYXL( const char *buffer, const int write_countL, int *count_writtenL, const short msg_tag, const short error_return); PARAMETERS buffer Specifies data buffer.
put_REPLYXL(2) OSS System Calls Reference Manual To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (n - p) put_select_single_np(2) NAME put_select_single_np - Initiates thread-aware select( ) function for a single file descriptor LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include #include
put_select_single_np(2) OSS System Calls Reference Manual • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). NOTES To use a combination of the default thread-aware select( ) and the put_select_single_np( ) functions in a single source file, you must compile the application using the _PUT_MODEL_ feature test macro only and explicitly call put_select_single_np( ). RETURN VALUES See the select(2) reference page.
System Functions (n - p) PUT_SETMODE(2) NAME PUT_SETMODE - Sets device-dependent Guardian file-system functions LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_SETMODE(2) • OSS System Calls Reference Manual Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit applications. To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs.
System Functions (n - p) PUT_SETMODE(2) Process message Issuing a PUT_SETMODE( ) call to a file representing another process causes a system message -33 (process SETMODE) to be sent to that process. You can identify the process that called PUT_SETMODE( ) in a subsequent call to the Guardian FILE_GETRECEIVEINFO_ (or LASTRECEIVE or RECEIVEINFO) procedure. For a list of all system messages sent to processes, see the Guardian Procedure Errors and Messages Manual.
put_setOSSFileIOHandler(2) OSS System Calls Reference Manual NAME put_setOSSFileIOHandler - Sets interest in file descriptor LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include extern put_error_t put_setOSSFileIOHandler( const int filedes, const int read, const int write, const int error); PARAMETERS filedes Specifies the OSS file descriptor for the file of interest.
System Functions (n - p) put_setOSSFileIOHandler(2) RETURN VALUES PUT_SUCCESS This value is returned for any of the following conditions: • The filedes interest was successfully set • The filedes was not registered prior to this call • The specified filedes is invalid • The specified filedes is not supported PUT_ERROR The specified filedes was less than 0 (zero).
put_setTMFConcurrentTransactions(2) OSS System Calls Reference Manual NAME put_setTMFConcurrentTransactions - Sets the number of concurrent TMF transactions LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include int put_setTMFConcurrentTransactions( short max_trans); PARAMETERS max_trans Specifies the maximum number of concurrent transactions desired.
System Functions (n - p) PUT_TMF_GetTxHandle(2) NAME PUT_TMF_GetTxHandle - Gets the current TMF transaction handle LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include short PUT_TMF_GetTxHandle( PUT_TMF_TxHandle_t *tx_handle); PARAMETERS tx_handle Receives the current active TMF transaction handle.
PUT_TMF_GetTxHandle(2) 75 OSS System Calls Reference Manual There is no current transaction. RELATED INFORMATION Functions: PUT_TMF_SetTxHandle(2), PUT_TMF_Init(2).
System Functions (n - p) PUT_TMF_Init(2) NAME PUT_TMF_Init - Initializes the tfile for concurrent transaction management LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include short PUT_TMF_Init(void); PARAMETERS None. DESCRIPTION This function opens the tfile for concurrent transaction management. To use this function on systems running H06.21 or later RVUs or J06.
PUT_TMF_RESUME(2) OSS System Calls Reference Manual NAME PUT_TMF_RESUME - Resumes a previously suspended transaction associated with the current thread LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include short PUT_TMF_RESUME( long long *txid); PARAMETERS Input txid Specifies the transactional identifier returned by PUT_TMF_SUSPEND( ) or TMF_GET_TX_ID.
System Functions (n - p) PUT_TMF_RESUME(2) Nonzero values The Guardian file-system error with this error number occurred. RELATED INFORMATION Functions: PUT_TMF_SUSPEND(2).
PUT_TMF_SetAndValidateTxHandle(2) OSS System Calls Reference Manual NAME PUT_TMF_SetAndValidateTxHandle - Sets the current TMF transaction handle to be associated with the current thread LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (n - p) PUT_TMF_SetAndValidateTxHandle(2) Nonzero values The Guardian file-system error with this error number occurred. RELATED INFORMATION Functions: PUT_TMF_GetTxHandle(2), PUT_TMF_SetTxHandle(2), PUT_TMF_Init(2).
PUT_TMF_SetTxHandle(2) OSS System Calls Reference Manual NAME PUT_TMF_SetTxHandle - Sets the TMF transaction handle LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include short PUT_TMF_SetTxHandle( PUT_TMF_TxHandle_t *tx_handle); PARAMETERS tx_handle Specifies the transaction handle of the current TMF transaction.
System Functions (n - p) PUT_TMF_SetTxHandle(2) 75 Indicates that there is no current transaction. 78 Indicates an invalid transaction identifier or that a transaction has not started on this Expand node. 715 Indicates an invalid transaction handle. RELATED INFORMATION Functions: PUT_TMF_GetTxHandle(2), PUT_TMF_Init(2).
PUT_TMF_SUSPEND(2) OSS System Calls Reference Manual NAME PUT_TMF_SUSPEND - Suspends a transaction associated with the current thread LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include short PUT_TMF_SUSPEND( long long *txid); PARAMETERS Output txid Returns a transactional identifier that can be used for a subsequent PUT_TMF_RESUME( ) call.
System Functions (n - p) PUT_TMF_SUSPEND(2) RELATED INFORMATION Functions: PUT_TMF_RESUME(2).
PUT_UNLOCKFILE(2) OSS System Calls Reference Manual NAME PUT_UNLOCKFILE - Unlocks a disk file and any records in that file currently locked by the user LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_UNLOCKFILE(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). Considerations Nowait and PUT_UNLOCKFILE( ) The PUT_UNLOCKFILE( ) function must complete with a corresponding call to the Guardian AWAITIOX procedure when used with a file that is opened for nowait I/O.
PUT_UNLOCKREC(2) OSS System Calls Reference Manual NAME PUT_UNLOCKREC - Unlocks a Guardian file record currently locked by the user LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
System Functions (n - p) PUT_UNLOCKREC(2) • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
PUT_UNLOCKREC(2) OSS System Calls Reference Manual Use on OSS Objects This procedure operates only on Guardian objects. If an OSS file is specified, Guardian filesystem error 2 occurs. RETURN VALUES The PUT_UNLOCKREC( ) function returns 0 (zero) upon successful completion. Otherwise, this function returns a nonzero Guardian file-system error number that indicates the outcome of the operation. For information about Guardian file-system error numbers, see the Guardian Procedure Errors and Messages Manual.
System Functions (n - p) put_unregFile(2) NAME put_unregFile - Unregisters a Guardian file number as one that the user manages LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include extern put_error_t put_unregFile( const short filenum); PARAMETERS filenum Specifies the Guardian file number being unregistered.
put_unregFile(2) OSS System Calls Reference Manual • 5−292 The FILE_COMPLETE_SET_ procedure removal of filenum returned a nonzero value.
System Functions (n - p) put_unregOSSFileIOHandler(2) NAME put_unregOSSFileIOHandler - Unregisters an OSS file descriptor LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include extern put_error_t put_unregOSSFileIOHandler( const int filedes); PARAMETERS filedes Specifies the OSS file descriptor being unregistered.
put_unregPathsendTagHandler(2) OSS System Calls Reference Manual NAME put_unregPathsendTagHandler - Unregisters the user-supplied Pathsend tag LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include put_error_t put_unregPathsendTagHandler( const long tag); PARAMETERS tag Specifies the Pathsend tag to be unregistered.
System Functions (n - p) put_wakeup(2) NAME put_wakeup - Wakes up a thread awaiting tagged I/O LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS #include extern put_error_t put_wakeup( const short filenum, const long tag, const long count_transferred, const long error); PARAMETERS filenum Specifies the Guardian file number being waited on.
put_wakeup(2) OSS System Calls Reference Manual RETURN VALUES PUT_SUCCESS One of the following conditions exists: • tag was not -1 and waiting I/O was awakened. Note that only one awaiting I/O was awakened. • tag was -1 and awaiting I/O (if any) was awakened. PUT_ERROR One of the following conditions exists: 5−296 • The value specified for filenum was less than 0 (zero). • tag was not -1 and no awaiting IO was found.
System Functions (n - p) PUT_WRITEREADX(2) NAME PUT_WRITEREADX - Writes data to a Guardian file from an array and waits for data to be read back from the file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_WRITEREADX(2) OSS System Calls Reference Manual might be sharing the segment. The application must ensure that the buffer used in the call to the PUT_WRITEREADX( ) function is not reused before the I/O completes with a call to AWAITIOX. For programming information about the WRITEREADX procedure, see the Enscribe Programmer’s Guide and the Guardian Programmer’s Guide. To use this function on systems running J06.10 or later RVUs or H06.
System Functions (n - p) PUT_WRITEREADX(2) nowait I/O. Do not change the contents of the data buffer between the initiation and completion of a nowait PUT_WRITEREADX( ) operation. A retry can copy the data again from the user buffer and cause the wrong data to be written. Avoid sharing a buffer between a PUT_WRITEREADX( ) and another I/O operation because the contents of the data buffer might change before the write is completed.
PUT_WRITEREADX(2) OSS System Calls Reference Manual ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: PUT_CANCEL(2), PUT_CONTROL(2), PUT_FILE_CLOSE_(2), PUT_FILE_OPEN_(2), PUT_LOCKFILE(2), PUT_LOCKREC(2), PUT_READLOCKX(2), PUT_READUPDATELOCKX(2), PUT_READUPDATEX(2), PUT_READX(2), PUT_SETMODE(2), PUT_UNLOCKFILE(2), PUT_UNLOCKREC(2), PUT_WRITEUPDATEUNLOCKX(2), PUT_WRITEUPDATEX(2), PUT_WRITEX(2).
System Functions (n - p) PUT_WRITEUPDATEUNLOCKX(2) NAME PUT_WRITEUPDATEUNLOCKX - Performs random processing of records in a disk file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_WRITEUPDATEUNLOCKX(2) OSS System Calls Reference Manual For programming information about the WRITEUPDATEUNLOCKX procedure, see the Enscribe Programmer’s Guide and the Guardian Programmer’s Guide. To use this function on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the following tasks: • Include the pthread.h header file in the application. • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option.
System Functions (n - p) PUT_WRITEUPDATEUNLOCKX(2) Guardian file-system error 11 (record does not exist). Unstructured files (pointers unchanged) For unstructured files, data is written in the position indicated by the currentrecord pointer. A call to PUT_WRITEUPDATEUNLOCKX( ) for an unstructured file typically follows a call to the Guardian POSITION procedure or PUT_READUPDATEX( ). The current-record and next-record pointers are not changed by a call to PUT_WRITEUPDATEUNLOCKX( ).
PUT_WRITEUPDATEUNLOCKX(2) OSS System Calls Reference Manual Bounds checking If the extended address of buffer is odd, bounds checking rounds the address to the next lower word boundary and also checks an extra byte. The odd address is used for the transfer. All considerations for PUT_WRITEUPDATEX( ) also apply to this call. Use on OSS Objects This procedure operates only on Guardian objects. If an OSS file is specified, Guardian filesystem error 2 occurs.
System Functions (n - p) PUT_WRITEUPDATEX(2) NAME PUT_WRITEUPDATEX - Transfers data from an array in the application program to a Guardian file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_WRITEUPDATEX(2) OSS System Calls Reference Manual Data from the application process’s array is written in the position indicated by the setting of the current-record pointer. A call to this procedure typically follows a corresponding call to the PUT_READX( ) or PUT_READUPDATEX( ) function. The current-record and next-record pointers are not affected by the PUT_WRITEUPDATEX( ) procedure. For magnetic tapes, PUT_WRITEUPDATEX( ) is used to replace a record in an already written tape.
System Functions (n - p) PUT_WRITEUPDATEX(2) is also the maximum structured transfer size for DP2. Deleting locked records Deleting a locked record implicitly unlocks that record unless the file is audited, in which case the lock is not removed until the transaction terminates. Waited PUT_WRITEUPDATEX( ) calls If a waited PUT_WRITEUPDATEX( ) call is executed, the count_written parameter indicates the number of bytes actually written.
PUT_WRITEUPDATEX(2) OSS System Calls Reference Manual Unstructured files Transferring disk file data If the PUT_WRITEUPDATEX( ) call is to an unstructured disk file, data is transferred to the record location specified by the current-record pointer. File pointers after a successful call After a successful PUT_WRITEUPDATEX( ) call to an unstructured file, the current-record and next-record pointers are unchanged.
System Functions (n - p) PUT_WRITEUPDATEX(2) The buffer and count transferred can be in the user stack or in an extended data segment. The buffer and count transferred cannot be in the user code space. If the buffer or count transferred is in a selectable extended data segment, the segment must be in use at the time of the call. Flat segments allocated by a process are always accessible to the process.
PUT_WRITEUPDATEX(2) OSS System Calls Reference Manual Limitation of PUT_WRITEUPDATEX( ) to the same record Five is the maximum number of times a PUT_WRITEUPDATEX( ) call can be executed to the same record on tape. RETURN VALUES The PUT_WRITEUPDATEX( ) function returns 0 (zero) upon successful completion. Otherwise, this function returns a nonzero Guardian file-system error number that indicates the outcome of the operation.
System Functions (n - p) PUT_WRITEX(2) NAME PUT_WRITEX - Writes data from an array in the application program to an open Guardian file LIBRARY 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll SYNOPSIS [#include ] #include
PUT_WRITEX(2) • OSS System Calls Reference Manual Link the application to the zputdll library. On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit applications. To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs.
System Functions (n - p) PUT_WRITEX(2) to 4KB, which is the default. Transfer sizes over 4KB are not supported in default mode for unstructured access to structured files. Large data transfers using PUT_SETMODE(141) You can use PUT_SETMODE( ) function 141 to enable large data transfers (more than 4096 bytes) for files opened with unstructured access, regardless of unstructured buffer size.
PUT_WRITEX(2) OSS System Calls Reference Manual Unstructured files The record is inserted at the position indicated by the current value of the next-record pointer. If a record is to be inserted into a key-sequenced or relative file and the record already exists, the PUT_WRITEX( ) call fails, and a subsequent call to the Guardian FILE_GETINFO_ or FILEINFO procedure shows that Guardian filesystem error 10 occurred.
System Functions (n - p) PUT_WRITEX(2) If the PUT_WRITEX( ) call is to an unstructured disk file, data is transferred to the record location specified by the next-record pointer. The next-record pointer is updated to point to the record following the record written. Number of bytes written If an unstructured file is created with the odd unstructured attribute (also known as ODDUNSTR) set, the number of bytes written is exactly the number specified in write_count.
PUT_WRITEX(2) OSS System Calls Reference Manual • You can cancel nowait I/O that was initiated with PUT_WRITEX( ) with a call to PUT_CANCEL( ) or CANCELREQ. The I/O is canceled if the file is closed before the I/O completes or if the Guardian AWAITIOX procedure is called with a positive time limit and specific file number and the request times out.
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include /* optional except for POSIX.
System Functions (r) read(2) The value returned can be less than nbytes if the number of bytes left in the file is less than nbytes, if the read( ) request was interrupted by a signal, or if the file is a pipe, FIFO file, socket, or special file and has fewer than nbytes bytes immediately available for reading. For example, a read( ) from a file associated with a terminal might return one typed line of data. No data transfer occurs past the current end-of-file (EOF).
read(2) OSS System Calls Reference Manual Use on Guardian Objects After a call to the fork( ), tdm_fork( ), or tdm_spawn( ) function, the initial position within a Guardian EDIT file (a file in /G with file code 101) is the same for both parent and child processes. However, the position is not shared. Moving the current position from within one process does not move it in the other process.
System Functions (r) read(2) 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. [EALREADY] Operation already in progress.
read(2) OSS System Calls Reference Manual [ENOTCONN] The socket is no longer connected to a peer socket. [EOVERFLOW] The file is a regular file, the value of nbyte is greater than 0 (zero), the starting position is before the End-of-File (EOF), and the starting position is greater than or equal to the file offset maximum established when the file described by filedes was opened. [ETIMEDOUT] Data transmission on the socket timed out.
System Functions (r) read(2) The use of this function with the POSIX User Thread Model library conforms to industry standards as follows: 527186-023 • IEEE Std 1003.1-2004, POSIX System Application Program Interface • When a signal arrives during a call to a thread-aware read( ) function, the thread-aware read( ) retries the I/O operation instead of returning the errno value [EINTR] with the following exception.
read64_(2) OSS System Calls Reference Manual NAME read64_ - Reads from a file LIBRARY H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include /* optional except for POSIX.
System Functions (r) read64_(2) No data transfer occurs past the current end-of-file (EOF). If the starting position is at or after the end-of-file, 0 (zero) is returned. If a write( ), write64_( ), or writev( ) call contains so much data that the file system needs to resize a pipe or FIFO buffer, a read from that pipe or FIFO file can return up to 52 kilobytes of data, regardless of the size of PIPE_BUF.
read64_(2) OSS System Calls Reference Manual RETURN VALUES Upon successful completion, the read64_( ) function returns the number of bytes actually read and placed into the buffer. The function guarantees to read the number of bytes requested only if the descriptor references a regular file that has at least that number of bytes left before EOF.
System Functions (r) read64_(2) [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOMEM] There was insufficient memory available to complete the operation. [ENOTCONN] The socket is no longer connected to a peer socket.
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 and J-series native Guardian processes: implicit libraries H-series and J-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. NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications.
readlink(2) OSS System Calls Reference Manual [ENOTDIR] A component of the pathname prefix of the path parameter is not a directory. [ENXIO] An invalid device or address was specified during an input operation on a special file. One of the following 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 (r) readv(2) NAME readv - Reads from a file into scattered buffers LIBRARY G-series native OSS processes: /G/system/sysnn/zossesrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zossedll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yossedll 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdll
readv(2) OSS System Calls Reference Manual of O_NONBLOCK. When attempting to read from an empty pipe (or FIFO file): • If no process has the pipe open for writing, the readv( ) 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 readv( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing.
System Functions (r) readv(2) Use From a Threaded Application The thread-aware readv( ) function behaves exactly the same as spt_readvz( ) in the Standard POSIX Threads library. For file descriptors for regular files, if this thread-aware readv( ) function must wait for an I/O operation to complete on an open file, this function blocks the thread (instead of the entire process) that called it, while it waits for the I/O operation to complete. This function serializes file operations on an open file.
readv(2) OSS System Calls Reference Manual ERRORS If any of these conditions occurs, the readv( ) function sets errno to the corresponding value: [EAGAIN] 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. [EALREADY] Operation already in progress.
System Functions (r) [EISDIR] readv(2) A readv( ) operation was attempted against a directory. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [ENETDOWN] The filedes parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. [ENOMEM] There was insufficient memory available to complete the operation. [ENOTCONN] The socket is no longer connected to a peer socket.
readv(2) 6−20 OSS System Calls Reference Manual • IEEE Std 1003.1-2004, POSIX System Application Program Interface • When a signal arrives during a call to a thread-aware readv( ) function, the thread-aware readv( ) retries the I/O operation instead of returning the errno value [EINTR] with the following exception.
System Functions (r) recv(2) NAME recv - Receives a message from a connected socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
recv(2) OSS System Calls Reference Manual NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. When data is available, a call to the select( ) function indicates that the file descriptor for the socket is ready for reading. Calling the recv( ) function with a flags parameter of 0 (zero) is identical to calling the read( ) function.
System Functions (r) recv(2) [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. [EINTR] A signal interrupted the function before any data was available.
recv64_(2) OSS System Calls Reference Manual NAME recv64_ - Receives a message from a connected socket LIBRARY H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
System Functions (r) recv64_(2) NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. When data is available, a call to the select( ) function indicates that the file descriptor for the socket is ready for reading. Calling the recv64_( ) function with a flags parameter of 0 (zero) is identical to calling the read64_( ) function.
recv64_(2) OSS System Calls Reference Manual [ETIMEDOUT] A transmission timed out on an active connection. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set) and the operation would block. RELATED INFORMATION Functions: fcntl(2), read(2), read64_(2), recvfrom(2), recvfrom64_(2), recvmsg(2), recvmsg64_(2), select(2), send(2), send64_(2), sendmsg(2), sendmsg64_(2), sendto(2), sendto64_(2), shutdown(2), sockatmark(2), socket(2), write(2), write64_(2).
System Functions (r) recvfrom(2) NAME recvfrom - Receives a message from a socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
recvfrom(2) OSS System Calls Reference Manual For message-based sockets (sockets of type SOCK_DGRAM), the entire message must be read in one call. If a message is too long to fit in the supplied buffer and MSG_PEEK is not set in the flags parameter, the excess bytes are discarded. For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded.
System Functions (r) recvfrom(2) To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the function on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
recvfrom(2) OSS System Calls Reference Manual [EIO] An input or output error occurred. [ENOBUFS] There was not enough buffer space available to complete the call. A retry at a later time may succeed. [ENOMEM] There was insufficient memory available to complete the operation. [ENOTCONN] A receive operation was attempted on a connection-oriented socket that is not connected. [ENOTSOCK] The socket parameter does not refer to a socket.
System Functions (r) recvfrom64_(2) NAME recvfrom64_ - Receives a message from a socket LIBRARY H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
recvfrom64_(2) OSS System Calls Reference Manual flags parameter, the excess bytes are discarded. For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded. If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the recvfrom64_( ) function blocks until a message arrives.
System Functions (r) recvfrom64_(2) • 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. [EINVAL] The MSG_OOB value is specified in the flags parameter and no out-of-band data is available. [EIO] An input or output error occurred.
recvmsg(2) OSS System Calls Reference Manual NAME recvmsg - Receives a message from a socket using a message structure LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #inclu
System Functions (r) recvmsg(2) flags parameter, the excess bytes are discarded, and MSG_TRUNC is set in the msg_flags field of the msghdr structure. For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded. If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the recvmsg( ) function blocks until a message arrives.
recvmsg(2) OSS System Calls Reference Manual For AF_UNIX Release 1 sockets and for AF_UNIX Release 2 sockets in compatibility mode, when the file to which a sending datagram socket is bound is unlinked or renamed, and one of the send set of functions is called, the receiving client’s call to recvmsg( ) returns a null address (all fields in the address are zero).
System Functions (r) recvmsg(2) ERRORS If any of these conditions occurs, the recvmsg( ) function sets errno to the corresponding value: [EBADF] The socket parameter is not a valid file descriptor. This error is also returned if the recvmsg( ) function is thread-aware and the socket becomes invalid (is closed by another thread). [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available.
recvmsg(2) OSS System Calls Reference Manual [ETIMEDOUT] A transmission timed out on an active connection. [EWOULDBLOCK] The socket file descriptor is marked nonblocking (O_NONBLOCK is set), and the operation would block. RELATED INFORMATION Functions: fcntl(2), recv(2), recvfrom(2), select(2), send(2), sendmsg(2), sendto(2), shutdown(2), sockatmark(2), socket(2), socketpair(2), spt_recvmsgx(2). STANDARDS CONFORMANCE The HP implementation does not return the errno value [ENOSR].
System Functions (r) recvmsg64_(2) NAME recvmsg64_ - Receives a message from a socket using a message structure LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
recvmsg64_(2) OSS System Calls Reference Manual flags parameter, the excess bytes are discarded, and MSG_TRUNC is set in the msg_flags field of the msghdr64 structure. For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded.
System Functions (r) recvmsg64_(2) NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. When data is available, a call to the select( ) function indicates that the file descriptor for the socket is ready for reading.
recvmsg64_(2) OSS System Calls Reference Manual • The socket belongs to the AF_INET or AF_INET6 domain, and the function call requested msg_control data. • The socket belongs to the AF_UNIX domain, and the size of msg_controllen is less than the size of the cmsghdr structure plus one file descriptor. [EIO] An input or output error occurred. [EMFILE] The socket is in the AF_UNIX domain, and processing the cmsghdr structure would cause the receiving process to exceed OPEN_MAX.
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL H-series and J-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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll 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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL H-series and J-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 Interoperability Variants The C run-time library supports two variants of the rename( ) function: rename_oss( ) and rename_guardian( ). The variants support the unique file-naming conventions and structures of the OSS and Guardian file systems, respectively. The header file maps calls to rename( ) to the variant that matches the target compilation environment. The target environment is set with the systype pragma.
System Functions (r) [EBUSY] rename_oss(2) One of the following conditions occurred: • The to parameter specifies a directory that exists and is one of the following: — /G or /E — A Guardian disk volume or process name in /G (a file with an OSS pathname of the form /G/vol or /G/process) — The root directory of a fileset — The /dev directory or the lost+found file for a fileset (for example, /usr/lost+found, where /usr is the mount point for a fileset) • The from parameter specifies one of the followin
rename_oss(2) OSS System Calls Reference Manual • The pathname pointed to by the from parameter • A component of the pathname pointed to by the to parameter • A component of the pathname pointed to by the from parameter • The intermediate result of pathname resolution when a symbolic link is part of the to or from parameter The pathconf( ) function can be called to obtain the applicable limits.
System Functions (r) rename_oss(2) [EROFS] The requested operation requires writing in a directory on a read-only fileset. [ETXTBSY] The file to be renamed is already busy. The file specified by the from parameter is a NonStop SQL/MP object file that is currently executing. [EXDEV] The link specified by the to parameter and the file specified by the from parameter are on different filesets.
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 and J-series native Guardian processes: implicit libraries H-series and J-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) Accessing Files in Restricted-Access Filesets When accessing a file in a restricted-access fileset, the super ID (255,255 in the Guardian environment, 65535 in the OSS environment) is restricted by the same file permissions and owner privileges as any other user ID: It has no special privileges unless the executable file started by the super ID has the PRIVSETID file privilege.
rmdir(2) OSS System Calls Reference Manual — The directory owner — A process with appropriate privileges [EBUSY] One of the following conditions exists: • The directory specified by the path parameter is in use as the mount point for a fileset. • The directory specified by the path parameter is /E or /G (the Guardian file system) or a disk volume or process within /G (has an OSS pathname of the form /G/vol or /G/process).
System Functions (r) [ENOTDIR] rmdir(2) One of the following conditions exists: • A component of the directory pathname specified by the path parameter is not a directory. • The final component of the path parameter is a symbolic link. [ENOTEMPTY] The directory specified by the path parameter is not empty. [ENXIO] The fileset containing the client’s current working directory or root directory is not mounted. [EOSSNOTRUNNING] A required OSS system process is not running.
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 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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads
System Functions (s and S) sched_get_priority_max(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
sched_get_priority_min(2) OSS System Calls Reference Manual NAME sched_get_priority_min - Returns the minimum priority for a scheduling policy LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POSIX Threads
System Functions (s and S) sched_get_priority_min(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To use this function in a threaded application that uses the Standard POSIX Threads library on systems running H06.21 or later RVUs or J06.
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 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll H-series and J-series OSS processes that use the Standard POS
System Functions (s and S) sched_yield(2) To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same tasks (described above) used to enable the POSIX User Thread Model library on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
select(2) OSS System Calls Reference Manual NAME select - Selects among file descriptors for synchronous input/output multiplexing LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS
System Functions (s and S) select(2) errorfds Points to a file descriptor set consisting of file descriptors for objects opened for reading or writing. When the function is called, this file descriptor set specifies file descriptors to be checked for having exception conditions pending. Upon return from a successful call, this file descriptor set specifies file descriptors that have exception conditions pending.
select(2) OSS System Calls Reference Manual — is ready for reading — is ready for writing — has an exception pending When these conditions exist, a corresponding bit position is set in the returned file descriptor set pointed to by the readfds, writefds, and errorfds parameters.
System Functions (s and S) • select(2) 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. Use From a Threaded Application The thread-aware select( ) function can be used to check the status of multiple file descriptors.
select(2) OSS System Calls Reference Manual To use the select( ) functionality in a threaded application that uses the Standard POSIX Threads library, see spt_select(2) and spt_select_single_np(2). To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.
System Functions (s and S) select(2) • The invalid file descriptor set contains a file descriptor that identifies an AF_INET AF_INET6 socket, but the current processor is not running a transport agent process to support the socket. The file descriptor can only be closed. This error is also returned if the select( ) function is thread-aware and the socket becomes invalid (is closed by another thread).
select(2) OSS System Calls Reference Manual • The errno value [ETHNOTRUNNING] can be returned. • The time interval specified by the timeout parameter must meet these criteria: — The maximum interval is 2**31 seconds plus 2**31 microseconds. If a value greater than this is specified, the maximum is used instead. — If a specified interval is not a whole multiple of 10 milliseconds, the next highest whole multiple is used instead.
System Functions (s and S) semctl(2) NAME semctl - Performs semaphore control operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include int semctl( int semid, int semnum, int cmd [, . . . ]); In this instance, the elipsis ( . . . ) indicates that the function is extensible.
semctl(2) OSS System Calls Reference Manual *array Points to an array of semaphore values. These values are returned when the cmd parameter has the value GETALL. These values are used to set semaphore values when the cmd parameter has the value SETALL. arg Specifies the instance of the union used for the fourth parameter. DESCRIPTION An OSS semaphore is identified by a set ID and by a unique semaphore number within that set ID. The semaphore set ID is unique within an HP NonStop server node.
System Functions (s and S) SETALL semctl(2) Sets the respective values of all semaphores in the set to the values specified in the array pointed to in the fourth parameter (arg.array). When this operation successfully executes, the system clears the semaphore’s adjust-on-exit value in all processes that have a semadj value for this semaphore.
semctl(2) OSS System Calls Reference Manual GETPID Returns the value of the sempid field from the semid_ds structure. GETVAL Returns the value of the semval field from the semid_ds structure. GETZCNT Returns the value of the semzcnt field from the semid_ds structure. Upon successful completion, all other values of cmd return the value 0 (zero). If the semctl( ) function fails, the value -1 is returned and errno is set to indicate the error.
System Functions (s and S) semctl(2) RELATED INFORMATION Commands: ipcrm(1), ipcs(1). Functions: ftok(3), semget(2), semop(2). STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: • 527186-023 The errno values [EFAULT] and [ENOTOSS] can be returned.
semget(2) OSS System Calls Reference Manual NAME semget - Creates a new semaphore set ID or returns the ID of an existing semaphore set LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include int semget( key_t key, int nsems, int semflg); PARAMETERS key Specifies the key that identifies the semaphore set.
System Functions (s and S) semget(2) • The sem_nsems field is set to the value of the nsems parameter. • The sem_otime field is set to 0 (zero), and the sem_ctime field is set equal to the current time. The semget( ) function does not initialize the sem structure associated with each semaphore in the set. The individual OSS semaphores are initialized by using the semctl( ) function with the SETVAL or SETALL value for the cmd parameter.
semget(2) OSS System Calls Reference Manual [EEXIST] A semaphore set ID already exists for the key parameter, but ((semflg & IPC_CREAT) && (semflg & IPC_EXCL)) is not equal to 0 (zero). [EINVAL] One of the following conditions is true: • A semaphore set ID already exists for the key parameter, but the number of semaphores in the set is less than nsems and nsems is not equal to 0 (zero).
System Functions (s and S) semop(2) NAME semop - Performs semaphore operations LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include int semop( int semid, struct sembuf *sops, size_t nsops); PARAMETERS semid Specifies the ID of the semaphore set.
semop(2) OSS System Calls Reference Manual sem_flg Specifies various flags for the operations. The possible values are as follows: SEM_UNDO Instructs the system to adjust the process’s adjust-on-exit value (semadj) for a modified semaphore. When the process exits, the system uses this value to restore the semaphore to the value it had before any modifications by the process. This flag is used to prevent locking of resources allocated through a semaphore by a process that no longer exists.
System Functions (s and S) semop(2) If the sem_op field of the sembuf structure contains 0 (zero) and the calling process has read access permission, semop( ) does one of the following: • If the semval field of the sem structure contains 0 (zero), semop( ) returns immediately. • If semval is not zero and (sem_flg & IPC_NOWAIT) is not zero, semop( ) returns immediately.
semop(2) OSS System Calls Reference Manual [EINVAL] [ENOSPC] One of the following conditions is true: • The semid parameter is not a valid semaphore set ID. • The number of semaphores for which the SEM_UNDO flag is specified exceeds the system-defined limit. One of the following conditions is true: • The system-defined limit on the number of undo entries for an undo structure would be exceeded.
System Functions (s and S) send(2) NAME send - Sends a message on a connected socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
send(2) OSS System Calls Reference Manual 32-bit Guardian and 64-bit OSS clients can pass 32-bit pointers and 64-bit pointers to send64_( ). NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. When data can be sent, a call to the select( ) function indicates that the file descriptor for the socket is ready for writing. Calling the send( ) function with a flags parameter of 0 (zero) is identical to calling the write( ) function.
System Functions (s and S) send(2) [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. [EDESTADDRREQ] The socket is not connection-oriented and no peer address is set. [EFAULT] A user-supplied memory buffer cannot be accessed.
send(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: connect(2), fcntl(2), getsockopt(2), recv(2), recvfrom(2), recvmsg(2), select(2), sendmsg(2), sendto(2), setsockopt(2), sockatmark(2), shutdown(2), socket(2), spt_sendx(2). STANDARDS CONFORMANCE The HP implementation does not return the errno value [ENOSR]. The following are HP extensions to the XPG4 specification: • The errno value [ECONNRESET] can be returned when the transport-provider process is not available.
System Functions (s and S) send64_(2) NAME send64_ - Sends a message on a connected socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
send64_(2) OSS System Calls Reference Manual 32-bit Guardian and 64-bit OSS clients can pass 32-bit pointers and 64-bit pointers to send64_( ). NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module. When data can be sent, a call to the select( ) function indicates that the file descriptor for the socket is ready for writing.
System Functions (s and S) send64_(2) [ENOTCONN] The socket either is not connected or has not had the peer socket previously specified. [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. [EPIPE] One of the following conditions occurred: • An attempt was made to send a message on a socket that is shut down for writing.
sendmsg(2) OSS System Calls Reference Manual NAME sendmsg - Sends a message on a socket using a message structure LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
System Functions (s and S) sendmsg(2) If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the sendmsg( ) function blocks until space is available. If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is marked nonblocking (O_NONBLOCK is set), the sendmsg( ) function fails and sets errno to [EWOULDBLOCK].
sendmsg(2) • OSS System Calls Reference Manual Link the application to the zputdll library (/G/system/zdllnnn/zputdll). On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. To use this function in a 32-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.
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. This error is also returned if the sendmsg( ) function is thread-aware and a signal received from the pthread_kill( ) function is not blocked, ignored, or handled.
sendmsg(2) OSS System Calls Reference Manual • [ENOMEM] The msghdr structure specifies an empty string as a pathname. There was insufficient memory available to complete the operation. [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) sendmsg64_(2) NAME sendmsg64_ - Sends a message on a socket using a message structure LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
sendmsg64_(2) OSS System Calls Reference Manual If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the sendmsg64_( ) function blocks until space is available. If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is marked nonblocking (O_NONBLOCK is set), the sendmsg64_( ) function fails and sets errno to [EWOULDBLOCK].
System Functions (s and S) sendmsg64_(2) ERRORS If any of these conditions occurs, the sendmsg64_( ) function sets errno to the corresponding value: [EACCES] The socket is in the AF_UNIX domain and either search permission is denied for a component of the pathname in the msghdr64 structure or write access to the specified socket is denied. [EAFNOSUPPORT] Addresses in the specified address family cannot be used with this socket.
sendmsg64_(2) OSS System Calls Reference Manual [EIO] The socket is in the AF_UNIX domain, and the transport agent failed to inherit the file descriptors being passed, or an input or output error occurred. [ELOOP] The socket is in the AF_UNIX domain, and too many symbolic links were encountered in translating the pathname specified by the msghdr64 structure. [EMSGSIZE] The message is too large to be sent all at once, as required by the socket.
System Functions (s and S) sendmsg64_(2) • 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.
sendto(2) OSS System Calls Reference Manual NAME sendto - Sends a message on a socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
System Functions (s and S) dest_len sendto(2) Specifies the length of the sockaddr structure pointed to by the dest_addr parameter. 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.
sendto(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application that uses the POSIX User Thread Model library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks: • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
System Functions (s and S) sendto(2) [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) sendto64_(2) NAME sendto64_ - Sends a message on a socket LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include
sendto64_(2) dest_len OSS System Calls Reference Manual Specifies the length of the sockaddr structure pointed to by the dest_addr parameter. DESCRIPTION The sendto64_( ) 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.
System Functions (s and S) [EBADF] sendto64_(2) The socket parameter is not a valid file descriptor. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The socket can only be closed.
sendto64_(2) [ENOENT] [ENOMEM] OSS System Calls Reference Manual The socket is in the AF_UNIX domain and one of the following conditions exists: • A component of the pathname specified in the sockaddr structure does not name an existing file. • The sockaddr structure specifies an empty string as a pathname. There was insufficient memory available to complete the operation. [ENOTCONN] The socket is connection-oriented but is not connected.
System Functions (s and S) setegid(2) NAME setegid - Sets the effective group ID of the calling process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include /* optional except for POSIX.1 */ #include int setegid( gid_t egid ); PARAMETERS egid Specifies the new effective group ID.
setegid(2) OSS System Calls Reference Manual • 7−54 A process without appropriate privileges can set the effective group ID if the new effective group ID matches a group ID in the group list of the process.
System Functions (s and S) seteuid(2) NAME seteuid - Sets the effective user ID of the calling process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include /* optional except for POSIX.1 */ #include int seteuid( uid_t euid ); PARAMETERS euid Specifies the new effective user ID.
seteuid(2) 7−56 OSS System Calls Reference Manual Hewlett-Packard Company 527186-023
System Functions (s and S) setfilepriv(2) NAME setfilepriv - Sets one or more file privileges for an executable file LIBRARY H-series and J-series native Guardian Procesess: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int setfilepriv( const char *path, const unsigned char *fileprivs ); PARAMETERS path Points to the OSS pathname of the executable file. fileprivs Points to the bit pattern that determines the privileges for the file.
setfilepriv(2) OSS System Calls Reference Manual If the main executable of a process has a file privilege, then all user libraries and ordinary DLLs loaded into the process must also have that file privilege. Public DLLs and implicit DLLs do not need file privileges to be loaded into a process. NFS client processes are not allowed to write to a file that has file privileges.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include #include /* Optional except for POSIX.1 */ int setgid( gid_t gid); PARAMETERS gid Specifies the new group ID.
setgroups(2) OSS System Calls Reference Manual NAME setgroups - Sets the group list of the calling process LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include /* optional except for POSIX.1 */ #include
System Functions (s and S) setpgid(2) NAME setpgid - Sets the process group ID for job control LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.1 */ int setpgid( pid_t pid, pid_t pgid); PARAMETERS pid Specifies the process whose process group ID is to be changed. pgid Specifies the new process group ID.
setpgid(2) OSS System Calls Reference Manual [EPERM] [ESRCH] One of the following conditions exists: • The process indicated by the pid parameter is a session leader. • The value of the pid parameter matches the OSS process ID of a child process of the calling process, and the child process is not in the same session as the calling process.
System Functions (s and S) setpgrp(2) NAME setpgrp - Sets the process group ID LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include #include pid_t setpgrp(void); DESCRIPTION The setpgrp( ) function creates a new session when the calling process is not a process group leader.
setregid(2) OSS System Calls Reference Manual NAME setregid - Sets the real and effective group IDs LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include int setregid( gid_t rgid, gid_t egid ); PARAMETERS rgid Specifies the new real group ID. egid Specifies the new effective group ID.
System Functions (s and S) setregid(2) STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: 527186-023 • If both the real and effective group IDs are changed so that they differ from each other and from the saved-set group ID, then the saved-set group ID is set to the value of the effective group ID. • A process without appropriate privileges can set the effective group ID if the new effective group ID matches a group ID in the group list of the process.
setreuid(2) OSS System Calls Reference Manual NAME setreuid - Sets the real and effective user IDs LIBRARY G-series native OSS processes: /G/system/sysnn/zsecsrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll SYNOPSIS #include int setreuid( uid_t ruid, uid_t euid ); PARAMETERS ruid Specifies the new real user ID. euid Specifies the new effective user ID.
System Functions (s and S) 527186-023 setreuid(2) • If both the real and effective user IDs are changed so that they differ from each other and from the saved-set user ID, then the saved-set user ID is set to the value of the effective user ID. • A process without appropriate privileges cannot set the real user ID.
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 and J-series OSS processes: implicit libraries SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include [#include ] [#include ] [#include ] [#include
setsockopt(2) OSS System Calls Reference Manual IPV6_LEAVE_GROUP Disables the receipt of IPv6 multicast UDP datagrams for a specific group. 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_IF Specifies the interface (subnet) to use for outbound multicast UDP datagrams. option_value is an unsigned int. 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 • -1 to indicate a limit of 255 hops The default maximum number of hops allowed is 1. All other values cause an error and errno is set to [EINVAL].
setsockopt(2) OSS System Calls Reference Manual bypasses normal routing. 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].
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) [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. [EINVAL] One of the following conditions exists: • The specified option is not valid at the specified socket level.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll 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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZOSSKDLL 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
shmat(2) OSS System Calls Reference Manual Shared Segment Memory Alignment On servers running J06.12 or later J-series RVUs, or H06.23 or later H-series RVUs: • If shmaddr is nonzero and rounding is specified, the specified address is rounded to a multiple of 4 MB. • If shmaddr is nonzero and rounding is not specified, the specified address must be a multiple of 16 KB. • If shmaddr is zero, the system chooses an address that is a multiple of at least 16 KB. The SHMLBA constant is irrelevant.
System Functions (s and S) shmat(2) Refer to the SEGMENT_ALLOCATE_ procedure description in the Guardian Procedure Calls Reference Manual for more information about segment limits. RETURN VALUES Upon successful completion, the shmat( ) function increments the value of the shm_nattch field in the structure associated with the shared memory identifier of the attached shared memory segment. The starting address for the attached segment is returned.
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZOSSKDLL 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
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 cannot be performed from the Guardian environment on servers running J06.11 or earlier J-series RVUs, H06.
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZOSSKDLL 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZOSSKDLL 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
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 Both Guardian and OSS processes can call SEGMENT_ALLOCATE_ and related Guardian procedure calls: they can share segments as described for SEGMENT_ALLOCATE_. On servers running J06.12 or later J-series RVUs or H06.23 or later H-series RVUs, both Guardian processes and OSS processes can call shmget( ) and related functions; they can share segments as described for shmget( ). On servers running J06.11 or earlier J-series RVUs, H06.
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-023 On servers running J06.11 or earlier J-series RVUs, H06.22 or earlier H-series RVUs, or G-series RVUs, the errno value [ENOTOSS] can be returned if this function is called from a Guardian process.
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS [#include
System Functions (s and S) sigaction(2) Specifying the Signal The signal parameter specifies the signal. All values defined for signals in the signal.h header file are valid if the corresponding action is to restore the default action. All signals can be caught or ignored except the SIGKILL, SIGSTOP, and SIGABEND signals; these signals can neither be caught nor ignored.
sigaction(2) OSS System Calls Reference Manual threads), or sigsuspend( ) function. If and when the signal-catching function returns normally, the original signal mask is restored, regardless of any modifications made by the sigprocmask( ) or pthread_sigmask( ) function since the signal-catching function was invoked. 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) • The sigaction( ) function only works for synchronous signals. Attempting to set a signal action for an asynchronous signal is an error. This is true even in a single-threaded process. • The signal mask is manipulated using the following functions: sigemptyset( ), sigfillset( ), sigaddset( ), sigdelset( ), and sigismember( ).
sigaction(2) OSS System Calls Reference Manual ERRORS If any of the following conditions occurs, the sigaction( ) function sets errno to the corresponding value and no new signal-catching function is installed: [EFAULT] The action or o_action parameter points to a location outside of the allocated address space of the process. [EINVAL] One of the following conditions exists: [ENOTOSS] • The signal parameter is not a valid signal number.
System Functions (s and S) sigaction(2) HP does not support the Realtime Signals Extension. The errno value [ENOTSUP] is not returned. HP maintains only one alternate signal stack per process for unbound threads. If an alternate signal stack is registered, this alternate signal stack applies to all threads in the process. Note that this alternate signal stack behavior does not apply to bound threads.
sigaltstack(2) OSS System Calls Reference Manual NAME sigaltstack - Sets and gets the signal alternate stack context LIBRARY H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (s and S) sigaltstack(2) SS_ONSTACK The process is currently executing on the alternate signal stack. Attempts to modify the alternate signal stack while the process is executing on it fail. This flag cannot be modified by processes. SS_DISABLE The alternate signal stack is currently disabled. The value SIGSTKSZ is a system default that specifies the number of bytes that are usually required when manually allocating an alternate stack area.
sigaltstack(2) OSS System Calls Reference Manual • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). To call the sigaltstack( ) function with the POSIX User Thread Model library, you must specify the ss parameter as a null pointer. The PUT library will automatically create an alternate signal stack on behalf of the process.
System Functions (s and S) sigaltstack(2) The following are HP extensions to the IEEE Std 1003.1-2004, POSIX System Application Program Interface specification: 527186-023 • HP has defined several new signals, including SIGABEND. See the signal(4) reference page for a complete list. • If the SIGSTK signal is delivered while the alternate signal stack is active, the default action of terminating the process occurs.
sigpending(2) OSS System Calls Reference Manual NAME sigpending - Examines pending signals LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (s and S) sigpending(2) • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). For detailed information about writing multi-threaded and 64-bit applications for the Open System Services environment, see the Open System Services Programmer’s Guide.
sigprocmask(2) OSS System Calls Reference Manual NAME sigprocmask - Changes or examines the signal mask LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include
System Functions (s and S) sigprocmask(2) Use From the Guardian Environment If called from a TNS or accelerated Guardian process, the actions of this function are undefined and errno is set to [ENOTOSS]. EXAMPLES The following example shows how to use sigprocmask(SIG_BLOCK) to add the signal SIGINT to the signal set named newset and save the old mask. Later, the sigprocmask(SIG_SETMASK) function restores the mask to the previous value returned by the sigprocmask(SIG_BLOCK) function. #include
sigsuspend(2) OSS System Calls Reference Manual NAME sigsuspend - Changes the set of blocked signals and waits for a signal LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include
System Functions (s and S) sigsuspend(2) Use From the Guardian Environment If called from a TNS or accelerated Guardian process, the actions of this function are undefined and errno is set to [ENOTOSS]. NOTES To use the sigsuspend( ) functionality in a threaded application that uses the Standard POSIX Threads library, see spt_sigsuspend(2). To use this function in a threaded application that uses the POSIX User Thread Model library on systems running H06.21 or later RVUs or J06.
sigsuspend(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: pause(3), sigaction(2), signal(3), sigprocmask(2), spt_sigsuspend(2). Files: signal(4). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. The following are HP extensions to the XPG4 Version 2 specification: • 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) sigwait(2) NAME sigwait - Causes the calling thread to wait for a signal LIBRARY 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include int sigwait( sigset_t *set int *sig); PARAMETERS set Specifies the set of signals that the calling thread will wait for.
sigwait(2) OSS System Calls Reference Manual To use this function in a 64-bit threaded application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks to make the function threadaware in a multi-threaded application: • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option. • Compile the application using the -Wlp64 compiler command option.
System Functions (s and S) 527186-023 sigwait(2) Hewlett-Packard Company 7−111
sockatmark(2) OSS System Calls Reference Manual NAME sockatmark - Determines whether a socket is at the out-of-band mark LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #include int sockatmark( int socket); PARAMETERS socket Specifies the file descriptor for the socket. DESCRIPTION The sockatmark( ) function determines whether the specified socket is at an out-of-band mark in its receive queue data.
System Functions (s and S) sockatmark(2) RELATED INFORMATION Functions: recv(2), recvmsg(2), socket(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 specification.
socket(2) OSS System Calls Reference Manual NAME socket - Creates an endpoint for communications LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include int socket( int domain, int type, int protocol ); PARAMETERS domain Specifies the address family of the communications domain in which the socket is to be created. type Specifies the type of socket to be created.
System Functions (s and S) socket(2) Socket-level options control socket operations. The getsockopt( ) and setsockopt( ) functions are used to get and set these options, which are defined in the sys/socket.h file.
socket(2) OSS System Calls Reference Manual $ZAFN2 This transport-provider name is only valid for systems running AF_UNIX Release 2 software. If the AF_UNIX transport-provider name is $ZAFN2, the socket is created as an AF_UNIX Release 2 socket in portability mode. Sockets created in portability mode can communicate with each other but cannot communicate with sockets created in compatibility mode.
System Functions (s and S) socket(2) ERRORS If any of these conditions occurs, the socket( ) function sets errno to the corresponding value: [EACCES] The process does not have appropriate privileges to create the socket. [EAFNOSUPPORT] The specified address family is not supported. [EDEFINEERR] The Guardian DEFINE =TCPIPˆPROCESSˆNAME is invalid, and the DEFINE was used in an attempt to set the transport-provider name. [EMFILE] No more file descriptors are available for this process.
socket(2) OSS System Calls Reference Manual the desired AF_UNIX transport-provider name. [ENOMEM] There was insufficient memory available to complete the operation. [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 #define _XOPEN_SOURCE_EXTENDED 1 #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.
socketpair(2) OSS System Calls Reference Manual If the domain is AF_UNIX, the AF_UNIX transport-provider name determines if the socket is an AF_UNIX Release 1 socket, an AF_UNIX Release 2 socket in compatibility mode, or an AF_UNIX Release 2 socket in portability mode: $ZPLS For systems running AF_UNIX Release 1, $ZPLS is the only supported AF_UNIX transport-provider name and this name cannot be changed.
System Functions (s and S) • socketpair(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
socketpair(2) OSS System Calls Reference Manual • A previous call to the socket_transport_name_set( ) function specified a nonexistent transport-provider process. • The system is running AF_UNIX Release 1 and the OSS sockets local server process is not running. • The system is running AF_UNIX Release 2 and processor in which the calling process is running either: — Does not have an OSS sockets local server 2 process that is running, or — Does not have a transport-agent process that is running.
System Functions (s and S) • 527186-023 socketpair(2) The errno values [ENOENT] and [ETANOTRUNNING] can be returned.
socket_transport_name_get(2) OSS System Calls Reference Manual NAME socket_transport_name_get - Gets the name of the transport-provider process LIBRARY G-series native OSS processes: system library H-series OSS processes: implicit libraries SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include int socket_transport_name_get( int domain, char *buffer, int maxlen ); PARAMETERS domain Specifies the domain for which the transport-provider process name should be obtained.
System Functions (s and S) socket_transport_name_get(2) The value returned in the buffer pointed to by the buffer parameter is always an uppercase name. NOTES This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module.
socket_transport_name_get(2) OSS System Calls Reference Manual stack; check with your TCP/IP administrator to determine your site’s naming conventions before using this function to distinguish between stacks. RETURN VALUES Upon successful completion, the socket_transport_name_get( ) function returns the value 0 (zero). Otherwise, the value -1 is returned and errno is set to indicate the error.
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 #define _XOPEN_SOURCE_EXTENDED 1 #include int socket_transport_name_set( int domain, char *buffer ); PARAMETERS domain buffer Specifies the domain for which the transport-provider process name is being set.
socket_transport_name_set(2) OSS System Calls Reference Manual For more information about AF_UNIX Release 2, see the Open System Services Programmer’s Guide. NOTES This function is equivalent to the socket_set_inet_name( ) function in the Guardian sockets library. This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified when you compile the module.
System Functions (s and S) socket_transport_name_set(2) information about the CIP networking environment, see the Cluster I/O Protocols (CIP) Configuration and Management Manual. RETURN VALUES Upon successful completion, the socket_transport_name_set( ) function returns the value 0 (zero). Otherwise, the value -1 is returned and errno is set to indicate the error.
spt_accept(2) OSS System Calls Reference Manual NAME spt_accept - Initiates thread-aware accept( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #define _XOPEN_SOURCE_EXTENDED 1 #include int spt_accept( int socket, struct sockaddr *address, size_t *address_len); PARAMETERS See the accept(2) reference page. DESCRIPTION This is a thread-aware version of the accept( ) function.
System Functions (s and S) spt_acceptx(2) NAME spt_acceptx - Accepts a new connection on a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
spt_acceptx(2) OSS System Calls Reference Manual NOTES The macro to map accept( ) to spt_acceptx( ) is available in C applications when SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_NONBLOCK The alias to link accept( ) to spt_acceptx( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.
System Functions (s and S) spt_acceptx(2) [EFAULT] A user-supplied memory buffer cannot be accessed or written. [EINTR] The function call was interrupted by a signal that was caught before a valid connection arrived. [EINVAL] The socket is not accepting connections. [EMFILE] No more file descriptors are available for this process. [ENFILE] The maximum number of file descriptors for this processor are already open. [ENOBUFS] Not enough buffer space was available to complete the call.
spt_alarm(2) OSS System Calls Reference Manual NAME spt_alarm - Schedules an alarm signal for delivery to a process (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include unsigned int spt_alarm( nsigned int *seconds); PARAMETERS seconds Specifies the number of real-time seconds to wait before sending the SIGALRM signal.
System Functions (s and S) spt_alarm(2) RETURN VALUES If a previous call to the spt_alarm(2) function has time remaining, this call to the spt_alarm(2) function returns the number of seconds remaining. Otherwise this function returns a value of 0 (zero). RELATED INFORMATION Functions: alarm(3), pthread_kill(2), pthread_sigmask(2), spt_pause(2), spt_sigaction(2), spt_signal(2), spt_sigsuspend(2), spt_sigwait(2). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification.
spt_awaitio(2) OSS System Calls Reference Manual NAME spt_awaitio - Awaits a tagged I/O file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) spt_awaitio(2) ERRORS 16 filenum is not registered. 29 filenum < 0 (zero). 40 timelimit has expired. [EINTR] Wait was interrupted via spt_interrupt( ), spt_interruptTag( ), or a signal was received via pthread_kill( ) and is not blocked, ignored, or handled. STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
SPT_CANCEL(2) OSS System Calls Reference Manual NAME SPT_CANCEL - Cancels the oldest incomplete operation on a Guardian file opened for nowait I/O LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_CANCEL(2) ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: SPT_CONTROL(2), SPT_FILE_CLOSE_(2), SPT_FILE_OPEN_(2), SPT_LOCKFILE(2), SPT_LOCKREC(2), SPT_READLOCKX(2), SPT_READUPDATELOCKX(2), SPT_READUPDATEX(2), SPT_READX(2), SPT_SETMODE(2), SPT_UNLOCKFILE(2), SPT_UNLOCKREC(2), SPT_WRITEREADX(2), SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2).
spt_close(2) OSS System Calls Reference Manual NAME spt_close - Initiates thread-aware close( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_close( int filedes); PARAMETERS See the close(2) reference page. DESCRIPTION This is a thread-aware version of the close( ) function. Use spt_close( ) instead of close( ) to ensure proper operation of the various thread-aware IO functions.
System Functions (s and S) spt_closex(2) NAME spt_closex - Closes a file descriptor (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
spt_closex(2) OSS System Calls Reference Manual ERRORS If any of these conditions occur, the spt_closex( ) function sets errno to the corresponding value: [EBADF] The filedes parameter is not a valid open file descriptor. [EIO] An input or output error occurred. The device that the file is stored on might be in the down state, or both processors that provide access to the device might have failed. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment.
System Functions (s and S) spt_closez(2) NAME spt_closez - Initiates close( ) function for thread-aware functions LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_closez( int filedes); PARAMETERS filedes Specifies an open file descriptor obtained from a successful call to the acceptx( ), creat( ), dup( ), dup2( ), spt_dup2x( ), spt_fcntlz( ), open( ), open64( ), pipe( ), socket( ), or socketpair( ) function.
spt_closez(2) OSS System Calls Reference Manual following tasks: • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use. • Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). RETURN VALUES Upon successful completion, the value 0 (zero) is returned.
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 #define _XOPEN_SOURCE_EXTENDED 1 #include int spt_connect( int socket, const struct sockaddr *address, size_t address_len); PARAMETERS See the connect(2) reference page. DESCRIPTION This is a thread-aware version of the connect( ) function.
spt_connectx(2) OSS System Calls Reference Manual NAME spt_connectx - Connects a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_connectx( int socket, const struct sockaddr *address, size_t address_len ); PARAMETERS socket Specifies the file descriptor for the socket.
System Functions (s and S) spt_connectx(2) • A connection is established. • A timeout occurs. • A signal is caught. If a timeout occurs, the spt_connectx( ) call fails and errno is set to [ETIMEDOUT]; the connection is aborted. If an spt_connectx( ) call is interrupted by a signal that is caught while the call is blocked waiting to establish a connection, the spt_connectx( ) call fails and sets errno to [EINTR]; the connection is not aborted and is later established asynchronously.
spt_connectx(2) OSS System Calls Reference Manual [EADDRINUSE] An attempt was made to establish a connection using addresses that are already in use. [EADDRNOTAVAIL] The specified address is not available from this node. [EAFNOSUPPORT] Addresses in the specified address family cannot be used with this socket. [EALREADY] A connection request is already in progress for the specified socket. [EBADF] The socket parameter is not a valid file descriptor.
System Functions (s and S) [EINVAL] spt_connectx(2) One of the following conditions exists: • The size specified for the address_len parameter is not valid for an address in the address family that is used by this connection. • The sockaddr structure contains an invalid address family. [EIO] The socket is in the AF_UNIX domain and an I/O error occurred during a read or write to the file system. [EISCONN] The specified socket is connection-oriented and is already connected.
spt_connectx(2) OSS System Calls Reference Manual [EPROTOTYPE] The specified address has a different type than that of the socket bound to the specified peer address. [ETIMEDOUT] The attempt to connect timed out during connection establishment. RELATED INFORMATION Functions: accept(2), bind(2), connect(2), getsockname(2), select(2), send(2), sendmsg(2), sendto(2), socket(2), spt_connect(2), spt_sendx(2), spt_sendmsgx(2), spt_sendtox(2).
System Functions (s and S) SPT_CONTROL(2) NAME SPT_CONTROL - Performs device-dependent input/output operations LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_CONTROL(2) OSS System Calls Reference Manual The following considerations apply to use on magnetic tapes: When device is not ready If a magnetic tape rewind is performed concurrently with application program execution (that is, a rewind operation other than 6), any attempt to perform a read, write, or control operation to the rewinding tape unit while rewind is taking place results in an error indication. A subsequent call to the FILE_GETINFO_ or FILEINFO procedure shows that an error 100 occurred.
System Functions (s and S) spt_dup2x(2) NAME spt_dup2x - Duplicates and controls an open file descriptor (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
spt_dup2x(2) OSS System Calls Reference Manual NOTES The macro to map dup2( ) to spt_dup2x( ) is available in C applications when SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_NONBLOCK The alias to link dup2( ) to spt_dup2x( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.
System Functions (s and S) spt_dup2x(2) • The processor for the disk process of the specified file failed during an input or output operation, and the backup process took over. • 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.
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_fclosex(2) NAME spt_fclosex - Closes a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fclosex ( FILE *stream ); PARAMETERS stream Specifies the output or update stream. DESCRIPTION The spt_fclosex( ) function is the thread-aware version of the fclose( ) function.
spt_fclosex(2) OSS System Calls Reference Manual ERRORS If any of these conditions occur, the spt_fclosex( ) function sets errno to the value that corresponds to the condition: [EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying the stream parameter and the process would be delayed in the write operation. [EBADF] The file descriptor underlying the stream parameter is not valid.
System Functions (s and S) spt_fcntlx(2) NAME spt_fcntlx - Controls open file descriptors (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] [#include ] #include
spt_fcntlx(2) F_GETFD OSS System Calls Reference Manual Gets the value of the file descriptor flags, defined in the fcntl.h header file, that are associated with the value of the filedes parameter. File descriptor flags are associated with a single file descriptor and do not affect other file descriptors that refer to the same file. The argument1 parameter or argument2 parameter is ignored. The value F_GETFD is invalid for an OSSTTY or Telserv terminal device.
System Functions (s and S) spt_fcntlx(2) 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.
spt_fcntlx(2) OSS System Calls Reference Manual 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.
System Functions (s and S) F_SETOWN spt_fcntlx(2) Returns the value 0 (zero). If the spt_fcntlx( ) function fails, the value -1 is returned, and errno is set to indicate the error. ERRORS If any of these conditions occur, the spt_fcntlx( ) function sets errno to the corresponding value: [EAGAIN] The request parameter is F_SETLK, the type of lock (l_type) is shared (F_RDLCK) or exclusive (F_WRLCK), and a segment of a file to be locked is already exclusive-locked by another process.
spt_fcntlx(2) [EIO] OSS System Calls Reference Manual • The request parameter is F_GETOWN, and the filedes parameter does not specify a socket. • The request parameter is F_SETFD, and a flag in addition to FD_CLOEXEC in the argument1 parameter is set. When the request parameter is F_SETFD and FD_CLOEXEC is set, no other flag can be set. • The request parameter is F_SETFL, and any file status flag other than O_NONBLOCK, O_APPEND, O_CREAT, O_EXCL, O_SYNC, or O_TRUNC is set.
System Functions (s and S) spt_fcntlx(2) Errors and Messages Manual. RELATED INFORMATION Functions: creat(2), close(2), dup(2), dup2(2), exec(2), fcntl(2), open(2), read(2), socket(2), spt_dup2x(2), spt_readx(2), spt_writex(2), tdm_execve(2), tdm_execvep(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to IEEE Std 1003.
spt_fcntlz(2) OSS System Calls Reference Manual NAME spt_fcntlz - Controls open file descriptors (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) F_GETFD spt_fcntlz(2) Gets the value of the file descriptor flags, defined in the fcntl.h header file, that are associated with the value of the filedes parameter. File descriptor flags are associated with a single file descriptor and do not affect other file descriptors that refer to the same file. The argument1 parameter or argument2 parameter is ignored. The value F_GETFD is invalid for an OSSTTY or Telserv terminal device.
spt_fcntlz(2) OSS System Calls Reference Manual The file access mode is not changed when F_SETFL is used. F_GETOWN Gets the process ID or process group ID currently receiving the SIGURG signal for a socket. A process group ID is returned as a negative value. A positive value indicates the process ID. The value F_GETOWN is invalid for these calls: F_SETOWN • Guardian use of OSS sockets is not supported.
System Functions (s and S) spt_fcntlz(2) F_SETLKW64 Similar to F_SETLKW, except that it takes a pointer to a flock64 structure instead of a pointer to a flock structure. The O_NONBLOCK file status flag affects only operations against file descriptors derived from the same open( ) function. When a shared lock is set on a segment of a file, other processes can set shared locks on that segment or a portion of it.
spt_fcntlz(2) OSS System Calls Reference Manual For C++ applications, an alias to map fcntl( ) to spt_fcntlz( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. To use this function in a threaded application that uses the Standard POSIX Threads library on systems running J06.10 or later RVUs or H06.
System Functions (s and S) spt_fcntlz(2) shared-locked or exclusive-locked by another process. [EBADF] One of these conditions exists: • The request parameter is F_SETLK, F_SETLK64, F_SETLKW,or F_SETLKW64, the type of lock is shared (F_RDLCK), and filedes is not a valid file descriptor open for reading. • The type of lock is exclusive (F_WRLCK), and filedes is not a valid file descriptor open for writing. • The filedes parameter is not a valid open file descriptor.
spt_fcntlz(2) [EIO] OSS System Calls Reference Manual An input or output error occurred. The device holding the file might be in the down state, or both processors that provide access to the device might have failed. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment.
System Functions (s and S) spt_fcntlz(2) RELATED INFORMATION Functions: creat(2), creat64(2), close(2), dup(2), dup2(2), exec(2), fcntl(2), open(2), open64(2), read(2), socket(2), spt_dup2x(2), spt_readx(2), spt_readz(2), spt_writex(2), spt_writez(2), tdm_execve(2), tdm_execvep(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to IEEE Std 1003.
spt_fd_read_ready(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_fd_write_ready(2) 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.
spt_fflush(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_fflushx(2) NAME spt_fflushx - Flushes a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fflushx( FILE *stream ); PARAMETERS stream Specifies the output or update stream. DESCRIPTION The spt_fflushx( ) function is the thread-aware version of the fflush( ) function.
spt_fflushx(2) OSS System Calls Reference Manual [EFBIG] An attempt was made to write a file that exceeds the process’s file size limit or the maximum file size. [EINTR] The spt_fflushx( ) function was interrupted by a signal that was caught. [EIO] The TOSTOP tty local mode causes a background process to get a SIGTTOU signal if it attempts to write to the controlling terminal. The SIGTTOU signal, if it is not caught or ignored, will cause the process to block in a stopped state.
System Functions (s and S) spt_fgetc(2) 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).
spt_fgetcx(2) OSS System Calls Reference Manual NAME spt_fgetcx - Gets a character from a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fgetcx ( FILE *stream ); PARAMETERS stream Points to the file structure of an open file. DESCRIPTION The spt_fgetcx( ) function is the thread-aware version of the fgetc( ) function.
System Functions (s and S) spt_fgetcx(2) [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device. [EIO] The call is attempting to read from the process’s controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [ENOMEM] Insufficient memory is available for the operation.
spt_fgets(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_fgetsx(2) NAME spt_fgetsx - Gets a string from a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char *spt_fgetsx ( char *string, int n, FILE *stream ); PARAMETERS string Points to a string to receive bytes. n Specifies an upper bound on the number of bytes to read. stream Points to the FILE structure of an open file.
spt_fgetsx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal that was caught and no data was transferred. [EIO] The call is attempting to read from the process’s controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [ENOMEM] Insufficient memory is available for the operation.
System Functions (s and S) spt_fgetwc(2) 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.
spt_fgetwcx(2) OSS System Calls Reference Manual NAME spt_fgetwcx - Gets a wide character from a a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_fgetwcx ( FILE *stream ); PARAMETERS stream Specifies the input data. DESCRIPTION The spt_fgetwcx( ) function is the thread-aware version of the fgetwc( ) function.
System Functions (s and S) spt_fgetwcx(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
SPT_FILE_CLOSE_(2) OSS System Calls Reference Manual NAME SPT_FILE_CLOSE_ - Closes an open Guardian file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_FILE_CLOSE_ ( short filenum, [short tape_disposition ] ); PARAMETERS filenum specifies the file number of a Guardian file open instance that identifies the file to be closed.
System Functions (s and S) SPT_FILE_CLOSE_(2) Closing a nowait file open If an SPT_FILE_CLOSE_( ) call is executed for a nowait file that has pending operations, any incomplete operations are canceled. There is no indication as to whether the operation completed or not. Labeled tape processing If your system has labeled tape processing enabled, all tape actions (as specified by tape_disposition) wait for completion.
spt_FileIOHandler_p(2) OSS System Calls Reference Manual 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
System Functions (s and S) SPT_FILE_OPEN_(2) NAME SPT_FILE_OPEN_ - Establishes a communication path between an application process and a file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual 1 Read only 2 Write only 3 Extend (supported only for tape) The default is 0 (zero). exclusion Specifies the desired mode of compatibility with other openers of the file. Valid values are: 0 Shared 1 Exclusive 2 Process exclusive 3 Protected The default is 0 (zero). nowait_depth Specifies the number of nowait I/O operations that can be in progress for the file concurrently with other processing.
System Functions (s and S) process pair SPT_FILE_OPEN_(2) Specifies whether an I/O operation is automatically redirected to the backup process if the primary process or its processor module fails. For processes, this parameter is called sync depth. The process determines the maximum value. The value must be at least 1 for an I/O operation to a remote process pair to recover from a network failure.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual 10 Open an OSS file by its OSS pathname. Specifies that the file to be opened is identified by the pathname parameter. 11 Reserved; specify 0 (zero). 12 No transactions. For $RECEIVE, messages are not to include transaction identifiers. This bit must be 0 (zero) if bit 15 is 1. 13 Internationalization locale support. For $RECEIVE, data messages include internationalization locale information. This bit must be 0 (zero) if bit 15 is 1.
System Functions (s and S) SPT_FILE_OPEN_(2) primary_processhandle Indicates that the caller is requesting a backup open and specifies the process handle of the primary process that already has the file open when its backup attempts to open the file. If this parameter is supplied and not null (a null process handle has -1 in each word), filenum must contain the filenum value that was returned to the primary.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual • Are independent • Might arrive in either order at the destination • Might complete in either order Multiple opens on a given file can create a deadlock. Locks are granted on an open file (that is, file number) basis. Therefore, if a process opens the same file multiple times, a lock of one file number excludes access to the file through other file numbers.
System Functions (s and S) SPT_FILE_OPEN_(2) using nowait I/O to a process; the opener does not wait for the process being opened to service the open message. Direct and buffered I/O transfers A file opened by SPT_FILE_OPEN_( ) uses direct I/O transfers by default; SETMODE 72 is used to force the system to use an intermediate buffer in the process file segment (PFS) for I/O transfers.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual for read-write access read and write security levels are checked. A Guardian file has one of seven levels of security for each access mode. The owner of the file can set the security level for each access mode by using SETMODE function 1 or by using the File Utility Program (FUP) SECURE command. The following table shows the seven levels of security: Table 7−3.
System Functions (s and S) SPT_FILE_OPEN_(2) Any other user, local access XXXYXXY If the caller to SPT_FILE_OPEN_( ) fails the security check, the open fails with an error 48. You can obtain the security level of a file by a call to the Guardian FILE_GETINFOLIST[BYNAME]_ procedure, the FILEINFO procedure, or by the File Utility Program (FUP) INFO command. If you are using the Safeguard product, this security information might not apply.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual its structured form. (HP reserves the right to change this block format at any time.) For information about Enscribe block formats, see the Enscribe Programmer’s Guide.
System Functions (s and S) SPT_FILE_OPEN_(2) Considerations for Terminals The terminal used as the operator console should not be opened with exclusive access. If it is, console messages are not logged. Interprocess Communication Considerations Maximum concurrent nowait operations for an open of $RECEIVE The maximum number of concurrent nowait operations permitted for an open of $RECEIVE is 1. Attempting to open $RECEIVE and to specify a value greater than 1 causes an error 28 to be returned.
SPT_FILE_OPEN_(2) OSS System Calls Reference Manual • Used the Guardian OPEN procedure to open $RECEIVE. Notification of this failure is not sent to the process reading $RECEIVE. Opening an unconverted (C-series format) process from a high-PIN process A high-PIN process cannot open an unconverted process unless the unconverted process has the HIGHREQUESTERS object-file attribute set.
System Functions (s and S) 12 SPT_FILE_OPEN_(2) Callback has already been registered for this filenum. Some error numbers are warnings (that is, they indicate conditions that do not prevent the file from being opened); check the value returned for the filenum parameter to determine whether the file was opened successfully. Forexplanation of other error numbers returned, see the Guardian Procedure Errors and Messages Manual. ERRORS None. This function does not set the errno variable.
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 and J 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_fprintfx(2) OSS System Calls Reference Manual NAME spt_fprintfx - Prints formatted output to an output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fprintfx ( FILE *stream, const char *format [, value] . . . ); PARAMETERS stream Points to a FILE structure specifying an open stream to which converted values will be written.
System Functions (s and S) • spt_fprintfx(2) - Left align the result of the conversion within the field. + Begin the result of a signed conversion with a sign (+ or -). (space) Prefix a space character to the result if the first character of a signed conversion is not a sign. If both the (space) and + flags appear, the (space) flag is ignored. # Convert the value to an alternate form. For o conversion, it increases the precision to force the first digit of the result to be a 0 (zero).
spt_fprintfx(2) • OSS System Calls Reference Manual An optional h, l, ll, or L indicating the size of the argument corresponding to the following integer or floating-point conversion specifier: — An h followed by a d, i, o, u, x, or X conversion specifier indicates that the argument will be treated as a short int or unsigned short int. — An h followed by an n conversion specifier indicates that the argument will be treated as a pointer to a short int.
System Functions (s and S) 527186-023 spt_fprintfx(2) x or X Accepts an integer (int) value and converts it to unsigned hexadecimal notation. The letters abcdef are used for the x conversion and the letters ABCDEF are used for the X conversion. The precision specifies the minimum number of digits to appear. If the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1.
spt_fprintfx(2) OSS System Calls Reference Manual S Accepts a pointer to an array of wchar_t type. Wide characters from the array are converted to an array of bytes containing multibyte characters and the multibyte characters up to (but not including) the null character are printed. If a precision is specified, no more than the number of bytes specified by the precision are printed.
System Functions (s and S) spt_fprintfx(2) can be either positive or negative. For a description of the IEEE value classes, see the fp_class(3) reference page. Guardian functions are available to convert between floating-point formats. For a discussion of floating-point conversions, see the Guardian Programmer’s Guide. RETURN VALUES Upon successful completion, this function returns the number of bytes in the output string. Otherwise, a negative value is returned.
spt_fprintfx(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: fp_class(3), fprintf(3), isnan(3), toascii(3), printf(3), putc(3), scanf(3), sprintf(3), spt_fprintf(2), spt_printfx(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.
System Functions (s and S) spt_fputc(2) 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.
spt_fputcx(2) OSS System Calls Reference Manual NAME spt_fputcx - Writes a byte to a specified output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fputcx ( int c, FILE *stream ); PARAMETERS c Specifies the character to be written. stream Points to the file structure of an open file.
System Functions (s and S) spt_fputcx(2) RETURN VALUES The spt_fputcx( ) function, upon successful completion, returns the value written. If this function fails, it returns the constant EOF and sets errno. If the file descriptor underlying stream becomes invalid (is closed by another thread), EOF is returned with an errno value of [EBADF]. If a signal is received via pthread_kill(2) and is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR].
spt_fputcx(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: ferror(3), fputc(3), getc(3), getwc(3), printf(3), putc(3), putchar(3), puts(3), putwc(3), spt_getcx(2), spt_getwcx(2), spt_printfx(2), spt_putcx(2), spt_putcharx(2), spt_putsx(2), spt_putwcx(2), spt_writex(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
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_fputsx(2) OSS System Calls Reference Manual NAME spt_fputsx - Writes a string to a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_fputsx ( const char *string, FILE *stream ); PARAMETERS string Points to a string to be written to output. stream Points to the FILE structure of an open file.
System Functions (s and S) spt_fputsx(2) incomplete output. In addition, if any of these conditions occur, the spt_fputsx( ) function sets errno to the corresponding value: [EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the process would be delayed in the write operation. [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing.
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) reference 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_fputwcx(2) NAME spt_fputwcx - Writes a wide character to a specified stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_fputwcx ( wint_t c, FILE *stream ); PARAMETERS c Specifies the wide character to be written. stream Points to the output data.
spt_fputwcx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
System Functions (s and S) spt_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_freadx(2) OSS System Calls Reference Manual NAME spt_freadx - Reads input from a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include size_t spt_freadx ( void ∗ pointer, size_t size, size_t num_items, FILE ∗ stream ); PARAMETERS pointer Points to an array. size Specifies the size of the variable type of the array pointed to by the pointer parameter.
System Functions (s and S) spt_freadx(2) and is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR]. ERRORS The spt_freadx( ) function fails if: • The stream parameter is not open for reading. • The stream is unbuffered. • The stream’s buffer needed to be flushed and the function call caused an underlying spt_writex( ) or lseek( ) to be invoked and this underlying operation fails.
spt_fstat64z(2) OSS System Calls Reference Manual NAME spt_fstat64z - Provides information about an open file (serializes I/O operations on an open file)) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include /* optional except for POSIX.
System Functions (s and S) spt_fstat64z(2) nlink_t st_nlink; unsigned int st_acl:1; unsigned int __filler_1:15; uid_t st_uid; gid_t st_gid; dev_t st_rdev; off64_t st_size; time_t st_atime; time_t st_mtime; time_t st_ctime; mode_t st_basemode; /* Permissions with original group perms */ int64_t reserved[3]; }; The spt_fstat64z( ) function updates any time-related fields associated with the file before writing into the stat64 structure, unless it is a read-only fileset.
spt_fstat64z(2) OSS System Calls Reference Manual For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket File serial number (unique) File serial number (unique) File serial number (unique) File serial number (not unique within the HP NonStop node) File serial number of the socket file (unique) File serial number (unique) File serial number (unique) AF_UNIX socket /dev/null /dev/tty The st_ino value for all node entries in /E (including the entry for the logical link from the loca
System Functions (s and S) spt_fstat64z(2) S_ISVTX Sticky bit; used only for directories (not ORed for files in /G, the Guardian file system) S_TRUST 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 when the memory segment containing the buffers is not shared.
spt_fstat64z(2) st_gid OSS System Calls Reference Manual For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the calling process User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed next.
System Functions (s and S) st_atime spt_fstat64z(2) For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
spt_fstat64z(2) st_ctime OSS System Calls Reference Manual Status change time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (s and S) spt_fstat64z(2) Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text See
spt_fstat64z(2) OSS System Calls Reference Manual For C++ applications, an alias to map fstat( ) to spt_fstat64z( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK and the #define _FILE_OFFSET_BITS 64 preprocessor directives before including spthread.h or when you use equivalent compiler command options to compile the application.
System Functions (s and S) spt_fstat64z(2) [ENOROOT] The program attempted an operation while the root fileset was unavailable. [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.
spt_fstatz(2) OSS System Calls Reference Manual NAME spt_fstatz - Provides information about an open file (serializes I/O operations on an open file) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include /* optional except for POSIX.
System Functions (s and S) spt_fstatz(2) For J06.10 and earlier J-series RVUs and H06.21 and earlier H-series RVUs, the stat structure uses this definition from the sys/stat.
spt_fstatz(2) OSS System Calls Reference Manual For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket File serial number (unique) File serial number (unique) File serial number (unique) File serial number (not unique within the HP NonStop node) File serial number of the socket file (unique) File serial number (unique) File serial number (unique) AF_UNIX socket /dev/null /dev/tty The st_ino value for all node entries in /E (including the entry for the logical link from the local
System Functions (s and S) spt_fstatz(2) S_ISVTX Sticky bit; used only for directories (not ORed for files in /G, the Guardian file system) S_TRUST 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 when the memory segment containing the buffers is not shared.
spt_fstatz(2) st_gid OSS System Calls Reference Manual For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the calling process User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed next.
System Functions (s and S) st_atime spt_fstatz(2) For Contains Regular file Directory Pipe or FIFO AF_INET or AF_INET6 socket AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
spt_fstatz(2) st_ctime OSS System Calls Reference Manual Status change time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (s and S) spt_fstatz(2) Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text See f
spt_fstatz(2) OSS System Calls Reference Manual For C++ applications, an alias to map fstat( ) to spt_fstatz( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. To use this function in a threaded application that uses the Standard POSIX Threads library on systems running J06.10 or later RVUs or H06.
System Functions (s and S) spt_fstatz(2) • The file size (in bytes) or the file inode number (serial number) cannot be represented correctly in the structure pointed to by the buffer parameter. [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.
spt_fsyncz(2) OSS System Calls Reference Manual NAME spt_fsyncz - Writes modified data and file attributes to permanent storage (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include
System Functions (s and S) • spt_fsyncz(2) Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). RETURN VALUES Upon successful completion, the spt_fsyncz( ) function returns the value 0 (zero). Otherwise, it returns the value -1, and errno is set to indicate the error. ERRORS If any of these conditions occurs, the spt_fsyncz( ) function sets errno to the value that corresponds to the condition: [EBADF] The filedes parameter is not a valid file descriptor.
spt_fsyncz(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: open(2), socket(2), stat(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to IEEE Std 1003.1c-1995, POSIX System Application Program Interface, with this exception: • The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_ftruncate64z(2) NAME spt_ftruncate64z - Changes file length (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include int spt_ftruncate64z( int filedes, off64_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.
spt_ftruncate64z(2) OSS System Calls Reference Manual For C applications, a macro to map ftruncate( ) to spt_ftruncate64z( ) is available when you use the #define SPT_THREAD_AWARE_XNONBLOCK and the #define _FILE_OFFSET_BITS 64 preprocessor directives before including spthread.h or when you use equivalent compiler command options to compile the application.
System Functions (s and S) [EIO] spt_ftruncate64z(2) 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. The device holding the file might be in the down state, or both processors that provide access to the device might have failed. Data might have been lost during a transfer.
spt_ftruncatez(2) OSS System Calls Reference Manual NAME spt_ftruncatez - Changes file length (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include int spt_ftruncatez( int filedes, off_t length); PARAMETERS filedes Specifies the descriptor of a file that must be open for writing. length Specifies the new length of the file in bytes.
System Functions (s and S) spt_ftruncatez(2) For C applications, a macro to map ftruncate( ) to spt_ftruncatez( ) is available when you use the #define SPT_THREAD_AWARE_XNONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. For C++ applications, an alias to map ftruncate( ) to spt_ftruncatez( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive before including spthread.
spt_ftruncatez(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. [EROFS] The file resides on a read-only fileset. For all other error conditions, errno is set to the appropriate Guardian file-system error number. See the Guardian Procedure Errors and Messages Manual for more information about a specific Guardian file-system error.
System Functions (s and S) spt_fwrite(2) NAME spt_fwrite - Initiates thread-aware fwrite( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_fwrite( const void *pointer, size_t size, size_t num_items, FILE *stream); PARAMETERS See the fwrite(3) reference page either online or in the Open System Services Library Calls Reference Manual.
spt_fwritex(2) OSS System Calls Reference Manual NAME spt_fwritex - Writes to an output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include size_t spt_fwritex ( const void ∗ pointer, size_t size, size_t num_items, FILE ∗ stream ); PARAMETERS pointer Points to an array.
System Functions (s and S) spt_fwritex(2) ERRORS The spt_fwritex( ) function fails if: • The stream parameter is not open for writing. • The output file size cannot be increased. • The stream is unbuffered. • The buffer of stream needs to be flushed and the function call causes an underlying spt_writex( ) or lseek( ) to be invoked, and this underlying operation fails.
spt_fwritex(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_generateTag(2) NAME spt_generateTag - Increments and returns a static long tag LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include long spt_generateTag(void); PARAMETERS None. DESCRIPTION Increments and returns a static long string appropriate for use as a tag. Note that this long string will eventually wrap, thereby returning tags that may still be in use.
spt_getc(2) OSS System Calls Reference Manual NAME spt_getc - Initiates thread-aware getc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getc( FILE *stream); PARAMETERS See the getc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getc( ) function.
System Functions (s and S) spt_getchar(2) NAME spt_getchar - Executes thread-aware getchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getchar(void); PARAMETERS See the getchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getchar( ) function.
spt_getcharx(2) OSS System Calls Reference Manual NAME spt_getcharx - Gets a character from the standard input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_getcharx (void); PARAMETERS None. DESCRIPTION The spt_getcharx( ) function is the thread-aware version of the getchar( ) function.
System Functions (s and S) spt_getcharx(2) [EINTR] The read operation was interrupted by a signal that was caught, and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device. [EIO] The call is attempting to read from the process’s controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [ENOMEM] Insufficient memory is available for the operation.
spt_getcx(2) OSS System Calls Reference Manual NAME spt_getcx - Gets a character from a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_getcx ( FILE ∗ stream ); PARAMETERS stream Points to the FILE structure of an open file. DESCRIPTION The spt_getcx( ) function is the thread-aware version of the getc( ) function.
System Functions (s and S) spt_getcx(2) ERRORS If any of these conditions occur, the spt_getcx( ) function sets errno to the corresponding value: [EAGAIN] The O_NONBLOCK flag is set for the underlying input stream and the process would be delayed by the read operation. [EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal that was caught, and no data was transferred.
spt_gets(2) OSS System Calls Reference Manual NAME spt_gets - Initiates thread-aware gets( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_gets( FILE *stream); PARAMETERS See the gets(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the gets(3) function.
System Functions (s and S) spt_getsx(2) NAME spt_getsx - Gets a string from the standard input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include char ∗ spt_getsx ( char ∗ string ); PARAMETERS string Points to a string to receive bytes. DESCRIPTION The spt_getsx( ) function is the thread-aware version of the gets( ) function.
spt_getsx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal that was caught, and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device.
System Functions (s and S) spt_getTMFConcurrentTransactions(2) NAME spt_getTMFConcurrentTransactions - Gets the number of concurrent TMF transactions being used LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getTMFConcurrentTransactions ( void ); PARAMETERS None. DESCRIPTION This function gets the number of concurrent TMF transactions being used.
spt_getw(2) OSS System Calls Reference Manual NAME spt_getw - Initiates thread-aware getw( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_getw( FILE *stream); PARAMETERS See the getw(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getw( ) function.
System Functions (s and S) spt_getwc(2) NAME spt_getwc - Initiates thread-aware getwc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_getwc( FILE *stream); PARAMETERS See the getwc(3) reference page either online or in the Open System Services Library Calls Refrence Manual. DESCRIPTION This is a thread-aware version of the getwc( ) function.
spt_getwchar(2) OSS System Calls Reference Manual NAME spt_getwchar - Initiates thread-aware getwchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_getwchar(void); PARAMETERS See the getwchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the getwchar(3) function.
System Functions (s and S) spt_getwcharx(2) NAME spt_getwcharx - Gets a wide character from the standard input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_getwcharx (void); PARAMETERS None. DESCRIPTION The spt_getwcharx( ) function is the thread-aware version of the getwchar( ) function.
spt_getwcharx(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_getwcx(2) NAME spt_getwcx - Gets a wide character from a specified input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_getwcx ( FILE *stream ); PARAMETERS stream Specifies the input data. DESCRIPTION The spt_getwcx( ) function is the thread-aware version of the getwc( ) function.
spt_getwcx(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_getwx(2) NAME spt_getwx - Gets a word from an input stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_getwx ( FILE *stream ); PARAMETERS stream Points to the file structure of an open file. DESCRIPTION The spt_getwx( ) function is the thread-aware version of the getw( ) function.
spt_getwx(2) OSS System Calls Reference Manual [EBADF] The file descriptor underlying the stream is not a valid file descriptor or is not open for reading. [EINTR] The read operation was interrupted by a signal that was caught, and no data was transferred. [ENXIO] A request was made on a nonexistent device, or the request was outside the capabilities of the device.
System Functions (s and S) spt_INITRECEIVE(2) NAME spt_INITRECEIVE - Registers $RECEIVE filename LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_INITRECEIVEL(2) OSS System Calls Reference Manual NAME spt_INITRECEIVEL - Registers $RECEIVE filename (larger message version) LIBRARY H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) spt_interrupt(2) 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. errorSPT Specifies SPT error returned to waiting file.
spt_interruptTag(2) OSS System Calls Reference Manual 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
System Functions (s and S) SPT_LOCKFILE(2) NAME SPT_LOCKFILE - Excludes other users from accessing a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_LOCKFILE ( short filenum, [ long tag ] ); PARAMETERS filenum specifies the file number of a Guardian disk file open instance that identifies the file to be locked tag is for nowait input/output (I/O) only.
SPT_LOCKFILE(2) OSS System Calls Reference Manual Nowait and SPT_LOCKFILE( ) If the SPT_LOCKFILE( ) function is used to initiate an operation with a file opened for nowait I/O, it must complete with a corresponding call to the Guardian AWAITIO procedure. Locking modes Default mode If the file is already locked by another user when SPT_LOCKFILE( ) is called, the process requesting the lock is suspended and queued in a locking queue behind other users trying to access the file.
System Functions (s and S) SPT_LOCKFILE(2) Use on OSS Objects This procedure operates only on Guardian objects. If an OSS file is specified, Guardian filesystem error 2 occurs. RETURN VALUES The SPT_LOCKFILE( ) function returns 0 (zero) upon successful completion. Otherwise, this function returns a nonzero Guardian file-system error number that indicates the outcome of the operation. For information about Guardian file-system error numbers, see the Guardian Procedure Errors and Messages Manual.
SPT_LOCKREC(2) OSS System Calls Reference Manual NAME SPT_LOCKREC - Excludes other users from accessing a record in a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_LOCKREC(2) Considerations Record locking versus file locking A call to SPT_LOCKFILE( ) is not equivalent to locking all records in a file; that is, locking all records still allows insertion of new records, but file locking does not. File locks and record locks are queued in the order in which they are issued.
SPT_LOCKREC(2) OSS System Calls Reference Manual Structured files Calling LOCKREC after positioning on a nonunique key If the call to SPT_LOCKREC( ) immediately follows a call to KEYPOSITION where a nonunique alternate key is specified, the call to SPT_LOCKREC( ) fails. A subsequent call to the Guardian FILE_GETINFO_ or FILEINFO procedure shows that a Guardian file-system error 46 (invalid key) occurred.
System Functions (s and S) SPT_LOCKREC(2) ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: SPT_CANCEL(2), SPT_CONTROL(2), SPT_FILE_CLOSE_(2), SPT_FILE_OPEN_(2), SPT_LOCKFILE(2), SPT_READLOCKX(2), SPT_READUPDATELOCKX(2), SPT_READUPDATEX(2), SPT_READX(2), SPT_SETMODE(2), SPT_UNLOCKFILE(2), SPT_UNLOCKREC(2), SPT_WRITEREADX(2), SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2).
spt_lseek64z(2) OSS System Calls Reference Manual NAME spt_lseek64z - Sets file offset for read or write operation (serializes I/O operations on an open file) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include /* optional except for POSIX.
System Functions (s and S) spt_lseek64z(2) For C applications, a macro to map lseek( ) to spt_lseek64z( ) is available when you use the #define SPT_THREAD_AWARE_XNONBLOCK and the #define _FILE_OFFSET_BITS 64 preprocessor directives before including spthread.h or when you use equivalent compiler command options to compile the application.
spt_lseek64z(2) [EISDIR] OSS System Calls Reference Manual The filedes parameter refers to an OSS directory. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [EOVERFLOW] The application attempted to set the file offset beyond the maximum file offset supported for the file. [ESPIPE] The filedes parameter refers to a pipe, FIFO, or socket.
System Functions (s and S) spt_lseekz(2) NAME spt_lseekz - Sets file offset for read or write operation (serializes I/O operations on an open file)) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include /* optional except for POSIX.
spt_lseekz(2) OSS System Calls Reference Manual For C applications, a macro to map lseek( ) to spt_lseekz( ) is available when you use the #define SPT_THREAD_AWARE_XNONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. For C++ applications, an alias to map lseek( ) to spt_lseekz( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive before including spthread.
System Functions (s and S) [ESPIPE] spt_lseekz(2) The filedes parameter refers to a pipe, FIFO, or socket. [EWRONGID] One of these conditions occurred: • The process attempted an operation through an operating system input/output process (such as a terminal server process) that has failed or is in the down state. • The processor for the disk process of the specified file failed during an input or output operation, and the backup process took over.
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_pause(2) NAME spt_pause - Suspends a thread until a signal is received. LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_pause(void) DESCRIPTION This function suspends the calling thread until it receives a signal whose action is either to execute a signal-catching function or to terminate the process.
spt_printf(2) OSS System Calls Reference Manual NAME spt_printf - Initiates thread-aware printf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_printf( const char *format, ...); PARAMETERS See the printf(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the printf( ) function.
System Functions (s and S) spt_printfx(2) NAME spt_printfx - Prints formatted output to the standard output stream (thread-aware function) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_printfx ( const char *format [, value] . . . ); PARAMETERS format Specifies a character string combining literal characters with conversion specifications.
spt_printfx(2) • OSS System Calls Reference Manual + Begin the result of a signed conversion with a sign (+ or -). (space) Prefix a space character to the result if the first character of a signed conversion is not a sign. If both the (space) and + flags appear, the (space) flag is ignored. # Convert the value to an alternate form. For o conversion, it increases the precision to force the first digit of the result to be a 0 (zero).
System Functions (s and S) • spt_printfx(2) An optional h, l, ll, or L indicating the size of the argument corresponding to the following integer or floating-point conversion specifier: — An h followed by a d, i, o, u, x, or X conversion specifier indicates that the argument will be treated as a short int or unsigned short int. — An h followed by an n conversion specifier indicates that the argument will be treated as a pointer to a short int.
spt_printfx(2) 7−302 OSS System Calls Reference Manual x or X Accepts an integer (int) value and converts it to unsigned hexadecimal notation. The letters abcdef are used for the x conversion and the letters ABCDEF are used for the X conversion. The precision specifies the minimum number of digits to appear. If the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1.
System Functions (s and S) spt_printfx(2) S Accepts a pointer to an array of wchar_t type. Wide characters from the array are converted to an array of bytes containing multibyte characters and the multibyte characters up to (but not including) the null character are printed. If a precision is specified, no more than the number of bytes specified by the precision are printed.
spt_printfx(2) OSS System Calls Reference Manual can be either positive or negative. For a description of IEEE value classes, see the fp_class(3) reference page. Guardian functions are available to convert between floating-point formats. For a discussion of floating-point conversions, see the Guardian Programmer’s Guide. RETURN VALUES Upon successful completion, this function returns the number of bytes in the output string. Otherwise, a negative value is returned.
System Functions (s and S) spt_printfx(2) RELATED INFORMATION Functions: fp_class(3), fprintf(3), isnan(3), toascii(3), printf(3), putc(3), scanf(3), sprintf(3), spt_putcx(2), spt_fprintfx(2), spt_printf(2), spt_sprintfx(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.
spt_putc(2) OSS System Calls Reference Manual NAME spt_putc - Initiates thread-aware putc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_putc( int c, FILE *stream); PARAMETERS See the putc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putc( ) function.
System Functions (s and S) spt_putchar(2) NAME spt_putchar - Initiates thread-aware putchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern int spt_putchar( int c); PARAMETERS See the putchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putchar( ) function.
spt_putcharx(2) OSS System Calls Reference Manual NAME spt_putcharx - Writes a byte to the standard output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putcharx ( int cO ); PARAMETERS c Specifies the character to be written. DESCRIPTION The spt_putcharx( ) function is the thread-aware version of the putchar( ) function.
System Functions (s and S) spt_putcharx(2) RETURN VALUES The spt_putcharx( ) function and macro, upon successful completion, return the value written. If this function or macro fails, it returns the constant EOF. The function sets errno when an error is encountered. If the file descriptor underlying stdout becomes invalid (is closed by another thread), EOF is returned with an errno value of [EBADF].
spt_putcharx(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: ferror(3), fputc(3), getc(3), getwc(3), printf(3), putc(3), putchar(3), puts(3), putwc(3), spt_fputcx(2), spt_getcx(2), spt_getwcx(2), spt_printfx(2), spt_putcx(2), spt_putsx(2), spt_putwcx(2), spt_writex(2), write(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.
System Functions (s and S) spt_putcx(2) NAME spt_putcx - Writes a byte to a specified output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putcx ( int c, FILE *stream ); PARAMETERS c Specifies the character to be written. stream Points to the file structure of an open file.
spt_putcx(2) OSS System Calls Reference Manual correctly with a stream parameter that has side effects. In particular, the following does not work: spt_putcx(*f++) When a function is necessary, use the spt_fputcx( ) function instead. RETURN VALUES The spt_putcx( ) function and macro, upon successful completion, returns the value written. If this function or macro fails, it returns the constant EOF. The function sets errno when an error is encountered.
System Functions (s and S) [EPIPE] spt_putcx(2) An attempt was made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be sent to the process. Any error encountered during the underlying call to the spt_writex( ) function can cause this function to return the corresponding errno value reported by the spt_writex( ) 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_putsx(2) NAME spt_putsx - Writes a string to the standard output stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putsx ( const char *string ); PARAMETERS string Points to a string to be written to output. DESCRIPTION The spt_putsx( ) function is the thread-aware version of the puts( ) function.
spt_putsx(2) OSS System Calls Reference Manual In addition, if any of these conditions occur, the spt_putsx( ) function sets errno to the corresponding value: [EAGAIN] The O_NONBLOCK flag is set for the file descriptor of the underlying stream and the process would be delayed in the write operation. [EBADF] The file descriptor of the underlying stream is not a valid file descriptor open for writing.
System Functions (s and S) spt_putw(2) NAME spt_putw - Initiates thread-aware putw( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_putw( int c, FILE *stream); PARAMETERS See the putw(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putw( ) function.
spt_putwc(2) OSS System Calls Reference Manual NAME spt_putwc - Initiates thread-aware putwc( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_putwc( wint_t c, FILE *stream); PARAMETERS See the putwc(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putwc( ) function.
System Functions (s and S) spt_putwchar(2) NAME spt_putwchar - Initiates thread-aware fputwchar( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include wint_t spt_putwchar( wint_t c); PARAMETERS See the putwchar(3) reference page either online or in the Open System Services Library Calls Reference Manual. DESCRIPTION This is a thread-aware version of the putwchar( ) function.
spt_putwcharx(2) OSS System Calls Reference Manual NAME spt_putwcharx - Writes a wide character to the standard output stream (thread-aware) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_putwcharx ( wint_t c ); PARAMETERS c Specifies the wide character to be written. DESCRIPTION The spt_putwcharx( ) function is the thread-aware version of the putwchar( ) function.
System Functions (s and S) spt_putwcharx(2) [EBADF] The file descriptor underlying the standard output stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EILSEQ] The wide character code specified by the c parameter does not correspond to a valid character. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred.
spt_putwcx(2) OSS System Calls Reference Manual NAME spt_putwcx - Writes a wide character to a specified stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include wint_t spt_putwcx ( wint_t c, FILE *stream ); PARAMETERS c Specifies the wide character to be written. stream Points to the output data.
System Functions (s and S) spt_putwcx(2) [EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the process would be delayed in the write operation. [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing. [EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size. [EILSEQ] The wide character code specified by the c parameter does not correspond to a valid character.
spt_putwx(2) OSS System Calls Reference Manual NAME spt_putwx - Writes a word to a stream (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include int spt_putwx ( int w, FILE *stream ); PARAMETERS stream Points to the file structure of an open file. w Specifies the word to be written.
System Functions (s and S) spt_putwx(2) #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK RETURN VALUES The spt_putwx( ) function, upon successful completion, returns a value of 0 (zero). Otherwise, it returns a nonzero value. If the file descriptor underlying stream becomes invalid (is closed by another thread), a nonzero value is returned with an errno value of [EBADF].
spt_putwx(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_read(2) 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.
SPT_READLOCKX(2) OSS System Calls Reference Manual NAME SPT_READLOCKX - Sequentially locks and reads records in a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_READLOCKX(2) Use for key-sequenced, relative, and entry-sequenced files For key-sequenced, relative, and entry-sequenced files, a subset of the file (defined by the current access path, positioning mode, and comparison length) is locked and read with successive calls to SPT_READLOCKX( ). For key-sequenced, relative, and entry-sequenced files, the first call to SPT_READLOCKX( ) after a positioning (or open) locks and then returns the first record of the subset.
SPT_READLOCKX(2) OSS System Calls Reference Manual • You can cancel Nowait I/O initiated with SPT_READLOCKX( ) with a call to SPT_CANCEL( ) or CANCELREQ. The I/O is canceled if the file is closed before the I/O completes or if the Guardian AWAITIOX procedure is called with a positive time limit and specific file number and the request times out.
System Functions (s and S) SPT_READUPDATELOCKX(2) NAME SPT_READUPDATELOCKX - Allows random processing of records in a Guardian disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_READUPDATELOCKX(2) OSS System Calls Reference Manual Nowait I/O and SPT_READUPDATELOCKX( ) The SPT_READUPDATELOCKX( ) function must complete with a corresponding call to the Guardian AWAITIOX procedure when used with a file that is opened for nowait I/O. Use on nondisk files If SPT_READUPDATELOCKX( ) is performed on nondisk files, an error is returned. Random processing For key-sequenced, relative, and entry-sequenced files, random processing implies that a designated record must exist.
System Functions (s and S) SPT_READUPDATELOCKX(2) Use of buffers A file opened by SPT_FILE_OPEN_( ) uses direct I/O transfers by default; you can use SPT_SETMODE(72) to force the system to use an intermediate buffer in the process file segment (PFS) for I/O transfers. Bounds checking If the extended address of buffer is odd, bounds checking rounds the address to the next lower word boundary and checks an extra byte as well. The odd address is used for the transfer.
SPT_READUPDATEX(2) OSS System Calls Reference Manual NAME SPT_READUPDATEX - Reads data from a Guardian disk or process file in anticipation of a subsequent write to the file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_READUPDATEX(2) For programming information about the READUPDATEX procedure, see the Enscribe Programmer’s Guide and the Guardian Programmer’s Guide. Considerations Buffer use SPT_READUPDATEX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_READUPDATEX( ) can be either in the caller’s stack segment or any extended data segment.
SPT_READUPDATEX(2) OSS System Calls Reference Manual ERRORS None. This function does not set the errno variable. RELATED INFORMATION Functions: SPT_CANCEL(2), SPT_CONTROL(2), SPT_FILE_CLOSE_(2), SPT_FILE_OPEN_(2), SPT_LOCKFILE(2), SPT_LOCKREC(2), SPT_READLOCKX(2), SPT_READUPDATELOCKX(2), SPT_READX(2), SPT_SETMODE(2), SPT_UNLOCKFILE(2), SPT_UNLOCKREC(2), SPT_WRITEREADX(2), SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2).
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_readvx(2) OSS System Calls Reference Manual NAME spt_readvx - Reads from a file into scattered buffers (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (s and S) • spt_readvx(2) If some process has the pipe open for writing: — If the O_NONBLOCK flag is not set, the spt_readvx( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing. — If the O_NONBLOCK flag is set, the spt_readvx( ) function returns the value -1 and sets errno to [EAGAIN].
spt_readvx(2) OSS System Calls Reference Manual For C applications, a macro to map readv( ) to spt_readvx( ) is available when you use the #define SPT_THREAD_AWARE_NONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. For C++ applications, an alias to map readv( ) to spt_readvx( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK preprocessor directive before including spthread.
System Functions (s and S) spt_readvx(2) [EINTR] An spt_readvx( ) operation was interrupted by a signal before any data arrived. [EINVAL] One of these conditions occurred: [EIO] [EISDIR] • The sum of the iov_len values in the iov array was negative or overflowed a data item of type ssize_t. • The value of the iov_count parameter was less than or equal to 0 (zero) or greater than IOV_MAX.
spt_readvx(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to IEEE Std 1003.1c-1995, POSIX System Application Program Interface, with these exceptions: 7−342 • The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_readvz(2) NAME spt_readvz - Reads from a file into scattered buffers (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include
spt_readvz(2) OSS System Calls Reference Manual — If the O_NONBLOCK flag is not set, the spt_readvz( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing. — If the O_NONBLOCK flag is set, the spt_readvz( ) function returns the value -1 and sets errno to [EAGAIN].
System Functions (s and S) spt_readvz(2) the prior file operation is complete. For C applications, a macro to map readv( ) to spt_readvz( ) is available when you use the #define SPT_THREAD_AWARE_XNONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application.
spt_readvz(2) OSS System Calls Reference Manual [EFILEBAD] An attempt was made to read from a Guardian EDIT file (a file in /G with file code 101) with a corrupted internal structure. [EINTR] A spt_readvz( ) operation was interrupted by a signal before any data arrived. [EINVAL] One of these conditions occurred: [EIO] [EISDIR] • The sum of the iov_len values in the iov array was negative or overflowed a data item of type ssize_t.
System Functions (s and S) spt_readvz(2) • The processor for the disk process of the specified file failed during an input or output operation, and takeover by the backup process occurred. • The open file descriptor has migrated to a new processor, but the new processor lacks a resource or system process needed for use of the file descriptor. The file descriptor specified by the filedes parameter can only be closed.
SPT_READX(2) OSS System Calls Reference Manual NAME SPT_READX - Returns data from an open Guardian file to the application process data area LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_READX(2) Nowait SPT_READX( ) If a nowait SPT_READX( ) call is executed, count_read has no meaning and can be omitted. The count of the number of bytes read is obtained through the count-transferred parameter of the Guardian AWAITIOX procedure when the I/O operation completes. The SPT_READX( ) function must complete with a call to the Guardian AWAITIOX procedure when it is used with a file that is opened for nowait I/O.
SPT_READX(2) OSS System Calls Reference Manual • If the I/O has been initiated with SPT_READX( ), the I/O must be completed with a call to the Guardian AWAITIOX procedure. • A selectable extended data segment containing the buffer need not be in use at the time of the call to AWAITIOX. • You can cancel nowait I/O initiated with SPT_READX( ) with a call to SPT_CANCEL( ) or CANCELREQ.
System Functions (s and S) SPT_READX(2) Structured files A subset of records for sequential SPT_READX( ) calls The subset of records read by a series of calls to SPT_READX( ) is specified through calls to the Guardian POSITION or KEYPOSITION procedures. Reading of an approximate subset of records If an approximate subset is being read, the first record returned is the one whose key field, as indicated by the current key specifier, contains a value equal to or greater than the current key.
SPT_READX(2) OSS System Calls Reference Manual Odd unstructured If the unstructured file is created with the odd unstructured attribute (also known as ODDUNSTR) set, the number of bytes read is exactly the number of bytes specified with read_count. If the odd unstructured attribute is not set when the file is created, the value of read_count is rounded up to an even number before the SPT_READX( ) operation is executed.
System Functions (s and S) SPT_READX(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
spt_readx(2) OSS System Calls Reference Manual NAME spt_readx - Reads from a file (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (s and S) spt_readx(2) setting of O_NONBLOCK. When attempting to read from an empty pipe (or FIFO file): • If no process has the pipe open for writing, the spt_readx( ) function returns the value 0 (zero) to indicate EOF. • If some process has the pipe open for writing: — If the O_NONBLOCK flag is not set, the spt_readx( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing.
spt_readx(2) OSS System Calls Reference Manual For C++ applications, an alias to map read( ) to spt_readx( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. RETURN VALUES Upon successful completion, the spt_readx( ) function returns the number of bytes actually read and placed into the buffer.
System Functions (s and S) spt_readx(2) • [EISDIR] A physical I/O error occurred. Data might have been lost during a transfer. An spt_readx( ) operation was attempted against a directory. [EISGUARDIAN] The value used for the filedes parameter is appropriate only in the Guardian environment. [ENETDOWN] The filedes parameter specifies a file on a remote node, but communication with the remote node has been lost. [ENOTCONN] The socket is no longer connected to a peer socket.
spt_readz(2) OSS System Calls Reference Manual NAME spt_readz - Reads from a file (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include /* optional except for POSIX.
System Functions (s and S) spt_readz(2) When attempting to read from an empty pipe (or FIFO file): • If no process has the pipe open for writing, the spt_readz( ) function returns the value 0 (zero) to indicate EOF. • If some process has the pipe open for writing: — If the O_NONBLOCK flag is not set, the spt_readz( ) function blocks until either some data is written or the pipe is closed by all processes that had opened the pipe for writing.
spt_readz(2) OSS System Calls Reference Manual For C applications, a macro to map read( ) to spt_readz( ) is available when you use the #define SPT_THREAD_AWARE_XNONBLOCK preprocessor directive before including spthread.h or when you use an equivalent compiler command option to compile the application. For C++ applications, an alias to map read( ) to spt_readz( ) is available when you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive before including spthread.
System Functions (s and S) spt_readz(2) [EINVAL] The value of the nbytes parameter is greater than SSIZE_MAX. [EIO] One of these conditions occurred: [EISDIR] • 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. Data might have been lost during a transfer. A spt_readz( ) operation was attempted against a directory.
spt_readz(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: creat(2), creat64(2), dup(2), fcntl(2), ioctl(2), lseek(2), lseek64(2), open(2), open64(2), opendir(3), pipe(2), socket(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to IEEE Std 1003.1c-1995, POSIX System Application Program Interface, with these exceptions: • The use of the header file spthread.
System Functions (s and S) spt_RECEIVEREAD(2) 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
spt_RECEIVEREAD(2) OSS System Calls Reference Manual • 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.
System Functions (s and S) spt_RECEIVEREADL(2) NAME spt_RECEIVEREADL - Initiates thread-aware function for reading $RECEIVE (larger message version) LIBRARY H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_RECEIVEREADL(2) OSS System Calls Reference Manual RELATED INFORMATION Functions: spt_RECEIVEREAD(2), SPT_SERVERCLASS_SENDL_(3). STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification.
System Functions (s and S) spt_recv(2) 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 #define _XOPEN_SOURCE_EXTENDED 1 #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.
spt_recvfrom(2) OSS System Calls Reference Manual 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 #define _XOPEN_SOURCE_EXTENDED 1 #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.
System Functions (s and S) spt_recvfromx(2) NAME spt_recvfromx - Receives a message from a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_recvfromx( int socket, void *buffer, size_t length, int flags, struct sockaddr *address, size_t *address_len ); PARAMETERS socket Specifies the file descriptor of the socket.
spt_recvfromx(2) OSS System Calls Reference Manual For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded. If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the spt_recvfromx( ) function blocks until a message arrives.
System Functions (s and S) [EBADF] spt_recvfromx(2) The socket parameter is not a valid file descriptor. [ECONNRESET] One of the following conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The socket can only be closed. [EFAULT] A user-supplied memory buffer cannot be accessed or written.
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 #define _XOPEN_SOURCE_EXTENDED 1 #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_recvmsgx(2) NAME spt_recvmsgx - Receives a message from a socket using a message structure (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_recvmsgx( int socket, struct msghdr *message, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
spt_recvmsgx(2) OSS System Calls Reference Manual of the msghdr structure. For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored. For such sockets, data is returned as soon as it becomes available; no data is discarded. If no messages are available at the socket and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the spt_recvmsgx( ) function blocks until a message arrives.
System Functions (s and S) spt_recvmsgx(2) following tasks: • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use. • Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). When data is available, a call to the select( ) function indicates that the file descriptor for the socket is ready for reading.
spt_recvmsgx(2) OSS System Calls Reference Manual [EIO] An input or output error occurred. [EMFILE] The socket is in the AF_UNIX domain, and processing the cmsghdr structure would cause the receiving process to exceed OPEN_MAX. [ENOBUFS] Not enough buffer space was available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed.
System Functions (s and S) spt_recvx(2) NAME spt_recvx - Receives a message from a connected socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_recvx( int socket, void *buffer, size_t length, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
spt_recvx(2) OSS System Calls Reference Manual #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK To use this function in a threaded application that uses the Standard POSIX Threads library on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the following tasks: • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use.
System Functions (s and S) [ENOMEM] spt_recvx(2) Required memory resources were not available. A retry at a later time might succeed. [ENOTCONN] A receive operation was attempted on a connection-oriented socket that is not connected. [ENOTSOCK] The socket parameter does not refer to a socket. [EOPNOTSUPP] 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.
spt_regFile(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_regFileIOHandler(2) 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.
spt_regOSSFileIOHandler(2) OSS System Calls Reference Manual 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
System Functions (s and S) spt_regPathsendFile(2) 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.
spt_regPathsendTagHandler(2) OSS System Calls Reference Manual 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.
System Functions (s and S) spt_regPathsendTagHandler(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.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
spt_regTimerHandler(2) OSS System Calls Reference Manual 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
System Functions (s and S) spt_REPLYX(2) 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
spt_REPLYXL(2) OSS System Calls Reference Manual NAME spt_REPLYXL - Initiates thread-aware REPLYXL procedure call (larger message version) LIBRARY H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
System Functions (s and S) spt_REPLYXL(2) STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification.
spt_select(2) OSS System Calls Reference Manual NAME spt_select - Initiates thread-aware select( ) function for mulitple file descriptors LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J 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.
System Functions (s and S) spt_select(2) • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use. • Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). To use a combination of the spt_select( ) and the spt_select_single_np( ) functions in a single source file, you must explicitly call these functions. RETURN VALUES See the select(2) reference page.
spt_select_single_np(2) OSS System Calls Reference Manual NAME spt_select_single_np - Initiates thread-aware select( ) function for a single file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_select_single_np( int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout); PARAMETERS See the select(2) reference page.
System Functions (s and S) spt_select_single_np(2) NOTES To use this function in a threaded application that uses the Standard POSIX Threads library on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the following tasks: • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use.
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 #define _XOPEN_SOURCE_EXTENDED 1 #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.
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 #define _XOPEN_SOURCE_EXTENDED 1 #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_sendmsgx(2) OSS System Calls Reference Manual NAME spt_sendmsgx - Sends a message on a socket using a message structure (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_sendmsgx( int socket, const struct msghdr *message, int flags ); PARAMETERS socket Specifies the file descriptor of the socket.
System Functions (s and S) spt_sendmsgx(2) If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is blocking (O_NONBLOCK is not set), the spt_sendmsgx( ) function blocks until space is available. If the sending socket has no space to hold the message to be transmitted and the socket’s file descriptor is marked nonblocking (O_NONBLOCK is set), the spt_sendmsgx( ) function fails and sets errno to [EWOULDBLOCK].
spt_sendmsgx(2) OSS System Calls Reference Manual ERRORS If any of these conditions occur, the spt_sendmsgx( ) function sets errno to the corresponding value: [EACCES] The socket is in the AF_UNIX domain and either search permission is denied for a component of the pathname in the msghdr structure or write access to the specified socket is denied. [EAFNOSUPPORT] You cannot use addresses in the specified address family with this socket.
System Functions (s and S) spt_sendmsgx(2) [EIO] The socket is in the AF_UNIX domain, and the transport agent failed to inherit the file descriptors being passed, or an input or output error occurred. [ELOOP] The socket is in the AF_UNIX domain, and too many symbolic links were encountered in translating the pathname specified by the msghdr structure. [EMSGSIZE] The message is too large to be sent all at once, as required by the socket.
spt_sendmsgx(2) OSS System Calls Reference Manual • 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) spt_sendto(2) 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 #define _XOPEN_SOURCE_EXTENDED 1 #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.
spt_sendto(2) OSS System Calls Reference Manual The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_sendtox(2) NAME spt_sendtox - Sends a message on a socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_sendtox( int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, size_t dest_len ); PARAMETERS socket Specifies the file descriptor of the socket.
spt_sendtox(2) OSS System Calls Reference Manual DESCRIPTION The spt_sendtox( ) function is a thread-aware version of the sendto( ) function. The spt_sendtox( ) function sends a message through a connection-oriented or connectionless socket. If the socket is connectionless, the message is sent to the address specified in the sockaddr structure pointed to by the dest_addr parameter. If the socket is connection-oriented, the dest_addr parameter is ignored.
System Functions (s and S) [EACCES] spt_sendtox(2) The socket is in the AF_UNIX domain and either search permission is denied for a component of the pathname in the sockaddr structure, or write access to the specified socket is denied. [EAFNOSUPPORT] You cannot use addresses in the specified address family with this socket. [EBADF] The socket parameter is not a valid file descriptor.
spt_sendtox(2) OSS System Calls Reference Manual [ENETUNREACH] No route to the network or host is present. [ENOBUFS] Not enough buffer space was available to complete the call. A retry at a later time might succeed. [ENOENT] The socket is in the AF_UNIX domain and one of the following conditions exists: [ENOMEM] • A component of the pathname specified in the sockaddr structure does not name an existing file. • The sockaddr structure specifies an empty string as a pathname.
System Functions (s and S) spt_sendx(2) NAME spt_sendx - Sends a message on a connected socket (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include ssize_t spt_sendx( int socket, const void *buffer, size_t length, int flags ); PARAMETERS socket Specifies the file descriptor of the socket. buffer Points to the buffer containing the message to send.
spt_sendx(2) OSS System Calls Reference Manual The alias to link send( ) to spt_sendx( ) is available in C++ applications when SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner before including spthread.h: #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK To use this function in a threaded application that uses the Standard POSIX Threads library on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the following tasks: • Include the spthread.
System Functions (s and S) spt_sendx(2) [ENETDOWN] The local interface used to reach the destination is down. [ENETUNREACH] No route to the network or host is present. [ENOBUFS] Not enough buffer space was available to complete the call. A retry at a later time might succeed. [ENOMEM] Required memory resources were not available. A retry at a later time might succeed. [ENOTCONN] The socket either is not connected or has not had the peer socket previously specified.
SPT_SETMODE(2) OSS System Calls Reference Manual NAME SPT_SETMODE - Sets device-dependent Guardian file-system functions LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_SETMODE(2) Waited SPT_SETMODE( ) use The SPT_SETMODE( ) function is used on a file as a waited operation even if filenum has been opened for nowait operations. Use the Guardian SETMODENOWAIT procedure for nowait operations. Use for Telserv processes No SPT_SETMODE( ) calls on Telserv are allowed before doing an SPT_CONTROL( ) function 11.
SPT_SETMODE(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
System Functions (s and S) spt_setOSSFileIOHandler(2) NAME spt_setOSSFileIOHandler - Sets interest in file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_setTMFConcurrentTransactions(2) OSS System Calls Reference Manual NAME spt_setTMFConcurrentTransactions - Sets the number of concurrent TMF transactions LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_setTMFConcurrentTransactions ( short max_trans ); PARAMETERS max_trans Specifies the maximum number of concurrent transactions desired.
System Functions (s and S) spt_sigaction(2) NAME spt_sigaction - Specifies the action to take upon delivery of a signal (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_sigaction( int sig, const sigaction_t *act, sigaction_t *o_action); PARAMETERS sig Specifies the signal number.
spt_sigaction(2) OSS System Calls Reference Manual • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use. • Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). RETURN VALUES Upon successful completion, the spt_sigaction( ) function returns the value 0 (zero).
System Functions (s and S) spt_signal(2) NAME spt_signal - Installs a new signal handler LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include void *spt_signal(int sig, void (*handler)(int)) PARAMETERS sig Specifies the signal number. handler User-specified signal function that acts a signal handler.
spt_signal(2) OSS System Calls Reference Manual NOTES To use this function in a threaded application that uses the Standard POSIX Threads library on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the following tasks: • Include the spthread.h header file in the application. • Compile the application using the _SPT_MODEL_ feature test macro or equivalent compiler command option in addition to any other feature test macros in use.
System Functions (s and S) spt_sigpending(2) NAME spt_sigpending - Examines signals that are blocked and pending LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_sigpending(sigset_t *set); PARAMETERS set Specifies the set of signals that are blocked and pending.
spt_sigsuspend(2) OSS System Calls Reference Manual NAME spt_sigsuspend - Changes the set of blocked signals and waits for a signal LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_sigsuspend(const sigset_t *sset); PARAMETERS sset Specifies the set of signals to be blocked from delivery to the calling thread.
System Functions (s and S) spt_sigsuspend(2) RETURN VALUES When the signal is caught by the calling thread and control is returned from the signal-catching function, the calling thread resumes execution from the point of suspension. The spt_sigsuspend(2) function always returns -1 and sets errno to the value [EINTR]. ERRORS The spt_sigsuspend(2) function alway sets errno to the following value: [EINTR] The signal is caught by the calling thread and control is returned from the signal-catching function.
spt_sigwait(2) OSS System Calls Reference Manual NAME spt_sigwait - Causes the calling thread to wait for a signal LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_sigwait( sigset_t *set int *sig); PARAMETERS set Specifies the set of signals that the calling thread will wait for. sig Receives the signal number cleared from the specified set of signal numbers.
System Functions (s and S) spt_sigwait(2) erated asynchronously. RETURN VALUES On a successful call, the signal number is returned. Otherwise the error [EINVAL] is returned. ERRORS If the only signals passed are unsupported signals, the spt_sigwait( ) function returns the error [EINVAL]. For some signals, support by the spt_sigwait( ) function depends on the RVU running on the system: • The SIGUNCP signal is supported on systems running H-series RVUs only. • For H06.
spt_sleep(2) OSS System Calls Reference Manual 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 and J 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.
System Functions (s and S) spt_system(2) NAME spt_system - Initiates thread-aware system( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_system( const char *command); PARAMETERS See the system(3) reference page. DESCRIPTION This is a thread-aware version of the system( ) function.
spt_TimerHandler_p(2) OSS System Calls Reference Manual 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.
System Functions (s and S) SPT_TMF_GetTxHandle(2) 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.
SPT_TMF_Init(2) OSS System Calls Reference Manual 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.
System Functions (s and S) SPT_TMF_RESUME(2) NAME SPT_TMF_RESUME - Resumes a previously suspended transaction associated with the current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include short SPT_TMF_RESUME( long long *txid ); PARAMETERS Input txid Specifies the transactional identifier returned by SPT_TMF_SUSPEND( ) or TMF_GET_TX_ID.
SPT_TMF_SetAndValidateTxHandle(2) OSS System Calls Reference Manual NAME SPT_TMF_SetAndValidateTxHandle - Sets the current TMF transaction handle to be associated with the current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include short SPT_TMF_SetAndValidateTxHandle( SPT_TMF_TxHandle_t *tx_handle); PARAMETERS tx_handle Specifies the transaction handle of the current TMF transaction.
System Functions (s and S) SPT_TMF_SetTxHandle(2) 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.
SPT_TMF_SUSPEND(2) OSS System Calls Reference Manual NAME SPT_TMF_SUSPEND - Suspends a transaction associated with the current thread LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include short SPT_TMF_SUSPEND( long long *txid ); PARAMETERS Output txid Returns a transactional identifier that can be used for a subsequent SPT_TMF_RESUME( ) call.
System Functions (s and S) SPT_UNLOCKFILE(2) NAME SPT_UNLOCKFILE - Unlocks a disk file and any records in that file currently locked by the user LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_UNLOCKFILE ( short filenum, [long tag ] ); PARAMETERS filenum specifies the Guardian file number of a Guardian file open instance for the file that you want unlocked.
SPT_UNLOCKFILE(2) OSS System Calls Reference Manual • read the file, its read is processed. Transaction Management Facility (TMF) and SPT_UNLOCKFILE( ) If the current transaction modifies a file audited by TMF, locks on the file are released only when TMF ends or aborts the transaction. In other words, a locked audited file that the current transaction modified is unlocked during SPT_ENDTRANSACTION( ) or SPT_ABORTTRANSACTION( ) processing for that file.
System Functions (s and S) SPT_UNLOCKREC(2) NAME SPT_UNLOCKREC - Unlocks a Guardian file record currently locked by the user LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include short SPT_UNLOCKREC ( short filenum, [long tag ] ); PARAMETERS filenum specifies the Guardian file number of a Guardian file open instance for the file containing the record you want unlocked.
SPT_UNLOCKREC(2) OSS System Calls Reference Manual Calling SPT_UNLOCKREC( ) after KEYPOSITION If the call to SPT_UNLOCKREC( ) immediately follows a call to KEYPOSITION where a nonunique alternate key is specified, the SPT_UNLOCKREC( ) call fails. A subsequent call to FILE_GETINFO_ or FILEINFO shows that Guardian file-system error 46 (invalid key) occurred. However, if an intermediate call to SPT_READX( ) or SPT_READLOCKX( ) is performed, the call to SPT_UNLOCKREC( ) is permitted.
System Functions (s and S) SPT_UNLOCKREC(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
spt_unregFile(2) OSS System Calls Reference Manual NAME spt_unregFile - Unregisters a Guardian file number as one that the user manages LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern spt_error_t spt_unregFile( const short filenum); PARAMETERS filenum Specifies the Guardian file number being unregistered DESCRIPTION This function unregisters a Guardian file number as one that the user manages.
System Functions (s and S) spt_unregOSSFileIOHandler(2) NAME spt_unregOSSFileIOHandler - Unregisters an OSS file descriptor LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include extern spt_error_t spt_unregOSSFileIOHandler( const int filedes); PARAMETERS filedes Specifies the OSS file descriptor being unregistered DESCRIPTION This function unregisters an OSS file descriptor as one that the user manages.
spt_unregPathsendTagHandler(2) OSS System Calls Reference Manual NAME spt_unregPathsendTagHandler - Unregisters the user-supplied Pathsend tag LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include spt_error_t spt_unregPathsendTagHandler ( const long tag ); PARAMETERS tag Specifies the Pathsend tag to be unregistered. DESCRIPTION This function unregisters the specified Pathsend tag as a tag that user manages.
System Functions (s and S) spt_usleep(2) NAME spt_usleep - Suspends execution of the thread for a specified number of microseconds LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_usleep( unsigned int useconds); PARAMETERS useconds Specifies the number of microseconds for which the thread is to be suspended. The value specified must be less than or equal to 1000000.
spt_vfprintf(2) OSS System Calls Reference Manual NAME spt_vfprintf - Initiates thread-aware vfprintf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_vfprintf( FILE *stream, const char *format, va_list printarg); PARAMETERS See the vfprintf(3) reference page either online or in the Open System Services Library Calls Reference Manual.
System Functions (s and S) spt_vfprintfx(2) NAME spt_vfprintfx - Formats a variable number of parameters for output (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include int spt_vfprintfx ( FILE *stream, const char *format, va_list printarg ); PARAMETERS stream Specifies the output stream.
spt_vfprintfx(2) OSS System Calls Reference Manual { va_list args; /* ** Display the name of the function that called error */ spt_fprintfx(stderr, "ERROR in %s: ", funct); /* ** Display the remainder of the message */ va_start(args, fmt); spt_vfprintfx(stderr, fmt, args); va_end(args); abort(); } RETURN VALUES Upon successful completion, this function returns the number of bytes in the output string. Otherwise, a negative value is returned.
System Functions (s and S) spt_vfprintfx(2) [ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device. [EPIPE] An attempt was made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be sent to the process. RELATED INFORMATION Functions: fprintf(3), printf(3), sprintf(3), spt_fprintx(2), spt_printfx(2), spt_sprintfx(2), spt_vfprintf(2), spt_vsprintfx(2), vprintf(3), vsprintf(3).
spt_vprintf(2) OSS System Calls Reference Manual NAME spt_vprintf - Initiates thread-aware vprintf( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include int spt_vprintf( const char *format, va_list printarg); PARAMETERS See the vprintf(3) reference page either online or in the Open System Services Library Calls Reference manual. DESCRIPTION This is a thread-aware version of the vprintf( ) function.
System Functions (s and S) spt_vprintfx(2) NAME spt_vprintfx - Formats a variable number of parameters for output (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
spt_vprintfx(2) OSS System Calls Reference Manual [EILSEQ] An invalid wide character was detected. [EINTR] The operation was interrupted by a signal that was caught, and no data was transferred. [EINVAL] There are insufficient arguments.
System Functions (s and S) spt_waitpid(2) NAME spt_waitpid - Initiates thread-aware waitpid( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include pid_t spt_waitpid( pid_t pid, int *stat_loc, int options); PARAMETERS See the waitpid(2) reference page. DESCRIPTION This is a thread-aware version of the waitpid( ) function. The socket must be nonblocking for this function to be thread-aware.
spt_waitpid(2) • OSS System Calls Reference Manual Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll). RETURN VALUES See the waitpid(2) reference page. Also, if a signal is received via the pthread_kill(2) function and is not blocked, ignored, or handled, -1 is returned with an errno value of [EINTR]. STANDARDS CONFORMANCE This function is an extension to the XPG4 Version 2 specification.
System Functions (s and S) spt_wakeup(2) NAME spt_wakeup - Wakes up a thread awaiting tagged I/O LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include
spt_write(2) OSS System Calls Reference Manual NAME spt_write - Initiates thread-aware write( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_write( int filedes, void *buffer, size_t nbytes); PARAMETERS See the write(2) reference page. DESCRIPTION This is a thread-aware version of the write( ) function. The file descriptor must be nonblocking for this function to be thread-aware.
System Functions (s and S) SPT_WRITEREADX(2) NAME SPT_WRITEREADX - Writes data to a Guardian file from an array and waits for data to be read back from the file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
SPT_WRITEREADX(2) Considerations Buffer use Terminals OSS System Calls Reference Manual SPT_WRITEREADX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_WRITEREADX( ) can be either in the caller’s stack segment or any extended data segment. A special hardware feature is incorporated in the asynchronous multiplexer controller that ensures the system is ready to read from the terminal as soon as the write is completed.
System Functions (s and S) SPT_WRITEREADX(2) • If you initiated the I/O with SPT_WRITEREADX( ), the I/O must be completed with a call to the Guardian AWAITIOX procedure. • A selectable extended data segment containing the buffer need not be in use at the time of the call to AWAITIOX. • You can call SPT_CANCEL( ) or CANCELREQ to cancel nowait I/O initiated with SPT_WRITEREADX( ).
SPT_WRITEUPDATEUNLOCKX(2) OSS System Calls Reference Manual NAME SPT_WRITEUPDATEUNLOCKX - Performs random processing of records in a disk file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) Considerations Buffer use SPT_WRITEUPDATEUNLOCKX(2) SPT_WRITEUPDATEUNLOCKX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_WRITEUPDATEUNLOCKX( ) can be either in the caller’s stack segment or any extended data segment. Nowait I/O and SPT_WRITEUPDATEUNLOCKX( ) The SPT_WRITEUPDATEUNLOCKX( ) function must complete with a corresponding call to the Guardian AWAITIOX procedure when used with a file that is opened for nowait I/O.
SPT_WRITEUPDATEUNLOCKX(2) OSS System Calls Reference Manual Use on files opened for nowait I/O • If the buffer is in an extended data segment, you cannot deallocate or reduce the size of the extended data segment before the I/O completes with a call to the Guardian AWAITIOX procedure or is canceled by a call to the SPT_CANCEL( ) function or the Guardian CANCELREQ procedure. • You must not modify the buffer before the I/O completes with a call to the Guardian AWAITIOX procedure.
System Functions (s and S) SPT_WRITEUPDATEUNLOCKX(2) STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to the following industry standards: • IEEE Std 1003.1c-1995, POSIX System Application Program Interface The use of the header file spthread.h is an HP exception to the POSIX standard.
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual NAME SPT_WRITEUPDATEX - Transfers data from an array in the application program to a Guardian file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) Considerations Buffer use SPT_WRITEUPDATEX(2) SPT_WRITEUPDATEX( ) is intended for use with 32-bit extended addresses. Therefore, the data buffer for SPT_WRITEUPDATEX( ) can be either in the caller’s stack segment or any extended data segment. I/O counts with unstructured files Unstructured files are transparently blocked using one of the four valid block sizes (512, 1024, 2048, or 4096 bytes; 4096 is the default).
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual Random processing and SPT_WRITEUPDATEX( ) For key-sequenced, relative, and entry-sequenced files, random processing implies that a designated record must exist. Positioning for SPT_WRITEUPDATEX( ) is always to the record described by the exact value of the current key and current-key specifier. If such a record does not exist, the call to SPT_WRITEUPDATEX( ) is rejected with Guardian file-system error 11 (record does not exist).
System Functions (s and S) SPT_WRITEUPDATEX(2) Specifying write_count for entry-sequenced files For entry-sequenced files, the value of write_count must match exactly the write_count value specified when the record was originally inserted into the file. Changing the primary-key of a key-sequenced record An update to a record in a key-sequenced file cannot alter the value of the primary-key field.
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual Magnetic Tape Considerations Supported equipment SPT_WRITEUPDATEX( ) is permitted only on the 3202 Controller for the 5103 or 5104 Tape Drives. This function is not supported on any other controller/tape drive combination.
System Functions (s and S) spt_writev(2) NAME spt_writev - Initiate thread-aware writev( ) function LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include ssize_t spt_writev( int filedes, struct iovec *iov, int iov_count); PARAMETERS See the writev(2) reference page. DESCRIPTION This is a thread-aware version of the writev( ) function. The file descriptor must be nonblocking for this function to be thread-aware.
spt_writevx(2) OSS System Calls Reference Manual NAME spt_writevx - Writes to a file from scattered buffers (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
System Functions (s and S) spt_writevx(2) The limit can be either the end of the physical medium or the value that has been set by the ulimit( ) function. The next write of a nonzero number of bytes gives a failure return (except as noted later). Upon successful completion, the spt_writevx( ) 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 before each write operation.
spt_writevx(2) • OSS System Calls Reference Manual If the O_NONBLOCK flag is set, the spt_writevx( ) function returns the value -1 and errno is set to [EAGAIN]. When you attempt to write to a socket with no space available for data: • If the O_NONBLOCK flag is not set, the spt_writevx( ) function blocks until space becomes available. • If the O_NONBLOCK flag is set, the spt_writevx( ) function returns the value -1 and sets errno to [EAGAIN]. The O_NONBLOCK flag has no effect if space is available.
System Functions (s and S) spt_writevx(2) [EALREADY] Operation already in progress. An I/O operation started by a thread-aware function (such as spt_writez( )) is in progress on a regular file and a function that is process-blocking for regular files (such as read( ), spt_read( ), or spt_readx( )) attempts to begin an I/O operation on the same open file. [EBADF] The filedes parameter is not a valid file descriptor open for writing.
spt_writevx(2) OSS System Calls Reference Manual [ENETDOWN] The filedes parameter specifies a file on a remote node, but communication with the remote node has been lost. [ENOSPC] No free space is left on the fileset containing the file. [ENOTCONN] An attempt was made to write to a socket that is not connected to a peer socket.
System Functions (s and S) • 527186-023 spt_writevx(2) When a signal arrives during a call to the spt_writevx( ) function, instead of returning an EINTR error to the application, the spt_writevx( ) retries the I/O operation, except in this case: If the fork( ) function is called by a signal handler that is running on a thread performing an spt_writevx( ) call, the spt_writevx( ) call in the child process returns an EINTR error to the application.
spt_writevz(2) OSS System Calls Reference Manual NAME spt_writevz - Writes to a file from scattered buffers (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include
System Functions (s and S) spt_writevz(2) as noted later). Upon successful completion, the spt_writevz( ) 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.
spt_writevz(2) OSS System Calls Reference Manual When attempting to write to a socket with no space available for data: • If the O_NONBLOCK flag is not set, the spt_writevz( ) function blocks until space becomes available or an error occurs. • If the O_NONBLOCK flag is set, the spt_writevz( ) function returns the value -1 and sets errno to [EWOULDBLOCK].
System Functions (s and S) spt_writevz(2) ERRORS If any of these conditions occurs, the spt_writevz( ) function sets errno to the corresponding value: [EAGAIN] [EBADF] One of these conditions occurred: • An attempt was made to write to a file descriptor that cannot accept data, and the O_NONBLOCK flag is set. • A write to a pipe (FIFO file) of PIPE_BUF bytes or less is requested, O_NONBLOCK is set, and not enough free space is available.
spt_writevz(2) OSS System Calls Reference Manual • A physical I/O error occurred. The device holding the file might be in the down state, or both processors that provide access to the device might have failed. 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.
System Functions (s and S) spt_writevz(2) Guardian file-system error. RELATED INFORMATION Functions: creat(2), creat64(2), fcntl(2), lseek(2), lseek64(2), open(2), open64(2), pipe(2), socket(2), spt_fcntlx(2), spt_write(2), spt_writev(2), spt_writex(2), ulimit(3), writev(2). STANDARDS CONFORMANCE This function is an extension to the UNIX 98 specification. Interfaces documented on this reference page conform to IEEE Std 1003.
SPT_WRITEX(2) OSS System Calls Reference Manual NAME SPT_WRITEX - Writes data from an array in the application program to an open Guardian file LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] #include
System Functions (s and S) SPT_WRITEX(2) I/O. Do not change the contents of the data buffer between the initiation and completion of a nowait write operation. A retry can copy the data again from the user buffer and cause the wrong data to be written. Avoid sharing a buffer between a write and another I/O operation because the contents of the write buffer might change before the write is completed.
SPT_WRITEX(2) OSS System Calls Reference Manual record) because all queue file records have unique keys generated for them. Relative files After an open or an explicit positioning by its primary key, the record is inserted in the designated position. Subsequent SPT_WRITEX( ) calls without intermediate positioning insert records in successive record positions. If -2 is specified in a preceding positioning, the record is inserted in an available record position in the file.
System Functions (s and S) SPT_WRITEX(2) Unstructured files DP2 BUFFERSIZE rules DP2 unstructured files are transparently blocked using one of the four valid DP2 blocksizes (512, 1024, 2048, or 4096 bytes; 4096 is the default). This transparent blocksize, known as BUFFERSIZE, is the transfer size used against an unstructured file. While BUFFERSIZE does not change the maximum unstructured transfer (4096 bytes), multiple I/Os can be performed to satisfy a user request depending on the BUFFERSIZE chosen.
SPT_WRITEX(2) OSS System Calls Reference Manual • You must not modify the buffer before the I/O completes with a call to the Guardian AWAITIOX procedure. This restriction also applies to other processes that might be sharing the segment. It is the application’s responsibility to ensure this. • If you initiated the I/O with SPT_WRITE( ), the I/O must be completed with a call to the Guardian AWAITIOX procedure.
System Functions (s and S) spt_writex(2) NAME spt_writex - Writes to a file (thread-aware version) LIBRARY G-series native OSS processes: /G/system/sysnn/zsptsrl H-series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS [#include ] [#include ] #include
spt_writex(2) OSS System Calls Reference Manual described in the open(2) reference page). The O_NONBLOCK flag is effective only on pipes, FIFOs, sockets, and terminal device files (Telserv and OSSTTY processes). Write requests to a pipe or a FIFO file are handled the same way as write requests to a regular file with these exceptions: • No file offset is associated with a pipe; therfore, each spt_writex( ) request appends to the end of the pipe.
System Functions (s and S) spt_writex(2) Upon successful completion, the spt_writex( ) 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 spt_fcntlx( ) function provides more information about record locks. If it is interrupted by a signal before it writes any data, the spt_writex( ) function returns the value -1 with errno set to [EINTR].
spt_writex(2) OSS System Calls Reference Manual • The connection was forcibly closed by the peer socket. The file descriptor specified by the filedes parameter can only be closed. [EFAULT] The buffer parameter points to a location outside of the allocated address space of the process. [EFBIG] An attempt was made to write a file that exceeds the maximum file size. [EGUARDIANLOCKED] An spt_writex( ) operation was attempted on a file in the Guardian file system (that is, a file in /G) that is locked.
System Functions (s and S) spt_writex(2) • An attempt was made to write to a pipe that has only one end open. • An attempt was made to write to a socket that is shut down or closed. [ETIMEDOUT] Data transmission on the socket timed out. [EWRONGID] One of these conditions occurred: • The process attempted an operation through an operating system input/output process (such as a terminal server process) that has failed or is in the down state.
spt_writez(2) OSS System Calls Reference Manual NAME spt_writez - Writes to a file (thread-aware version) LIBRARY H-series and J series OSS processes: /G/system/zdllnnn/zsptdll SYNOPSIS #include #include #include /* optional except for POSIX.
System Functions (s and S) spt_writez(2) • No file offset is associated with a pipe; therfore, each spt_writez( ) request appends to the end of the pipe. • If the size of the spt_writez( ) request is less than or equal to the value of the PIPE_BUF system variable, thespt_writez( ) function is guaranteed to be atomic. The data is not interleaved with data from other processes doing writes on the same pipe.
spt_writez(2) OSS System Calls Reference Manual The spt_fcntlz( ) function provides more information about record locks. If it is interrupted by a signal before it writes any data, the spt_writez( ) function returns the value -1 with errno set to [EINTR]. If it is interrupted by a signal after it has successfully written some data, the spt_writez( ) function returns the number of bytes that it has written.
System Functions (s and S) [EBADF] spt_writez(2) The filedes parameter does not specify a valid file descriptor open for writing. [ECONNRESET] One of these conditions occurred: • The transport-provider process for this socket is no longer available. • The TCP/IP subsystem for this socket is no longer available. • The connection was forcibly closed by the peer socket. The file descriptor specified by the filedes parameter can only be closed.
spt_writez(2) OSS System Calls Reference Manual • [EPIPE] No existing device is associated with the file descriptor specified by the filedes parameter. One of these conditions occurred: • An attempt was made to write to a pipe or FIFO file that is not open for reading by any process. A SIGPIPE signal is sent if the process is running in the OSS environment. • An attempt was made to write to a pipe that has only one end open. • An attempt was made to write to a socket that is shut down or closed.
System Functions (s and S) spt_writez(2) The POSIX standard allows certain behaviors of the write( ) function to be defined by the vendor. For more information, see the write(2) reference page.
stat(2) OSS System Calls Reference Manual NAME stat - Provides information about a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
System Functions (s and S) stat(2) For J06.10 and earlier J-series RVUs and H06.21 and earlier H-series RVUs, the stat structure uses this definition from the sys/stat.
stat(2) OSS System Calls Reference Manual /dev/tty st_ino ID of device containing directory entry File serial number (inode number). The file serial number and OSS device identifier uniquely identify a regular OSS file within an OSS fileset. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (s and S) stat(2) S_ISVTX Sticky bit; used only for directories (not ORed for files in /G, the Guardian file system) S_TRUST 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 when the memory segment containing the buffers is not shared. This flag applies only to loadfiles for a process and only a user with appropriate privileges (the super ID) can set it.
stat(2) OSS System Calls Reference Manual st_gid For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (s and S) st_atime stat(2) For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed 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 file status change Time of the last file status change Time of the last file status change Value retrieved from the inode Current time Composite value of the times of all openers of the file For the /E entry of the local node, the value is the time of the most recent mounting of the root fileset.
System Functions (s and S) stat(2) Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text See followi
stat(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. NOTES For J06.08 and earlier J-series RVUs, H06.
System Functions (s and S) [ENOROOT] stat(2) • The file specified by the path parameter does not exist. • The path parameter points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The specified pathname points to the name of a Guardian process that is not of subtype 30. • The path parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost.
stat(2) OSS System Calls Reference Manual STANDARDS CONFORMANCE The POSIX standards leave some features to the implementing vendor to define. These features are affected in the HP implementation: • For files other than regular disk files or symbolic links, the st_size field of the stat structure is set to 0 (zero). For directories, st_size is set to 4096. • The S_IRWXU, S_IRWXG, S_IRWXO, S_IFMT, S_ISVTX, S_ISGID, and S_ISUID bits are ORed into the st_mode field of the stat structure.
System Functions (s and S) stat64(2) NAME stat64 - Provides information about a file LIBRARY G-series native Guardian processes: system library G-series native OSS processes: system library H-series and J-series native Guardian processes: implicit libraries H-series and J-series OSS processes: implicit libraries SYNOPSIS #include #include /* optional except for POSIX.
stat64(2) OSS System Calls Reference Manual The file information is written to the area specified by the buffer parameter, which is a pointer to a stat64 structure. For J06.11 and later J-series RVUs and H06.22 and later H-series RVUs, the stat64 structure uses this definition from the sys/stat.
System Functions (s and S) st_dev stat64(2) 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.
stat64(2) OSS System Calls Reference Manual returned from the inode. S_IRWXG Permissions for the owning group, or if the st_acl flag is set, permissions for the the class ACL entry.
System Functions (s and S) st_uid stat64(2) 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. st_gid For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty User ID of the file owner User ID of the file owner User ID of the file owner User ID of the creator of the socket file User ID of the super ID User ID of the super ID Group ID. Values for OSS objects are listed next.
stat64(2) st_atime OSS System Calls Reference Manual For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Size of the file in bytes 4096 0 (zero) 0 (zero) 0 (zero) 0 (zero) Access time. Values for OSS objects are listed next. Values for Guardian objects are described in Use on Guardian Objects, later in this reference page.
System Functions (s and S) stat64(2) For Contains Regular file Directory FIFO AF_UNIX socket /dev/null /dev/tty Time of the last file status change Time of the last file status change Time of the last file status change Value retrieved from the inode Current time Composite value of the times of all openers of the file For the /E entry of the local node, the value is the time of the most recent mounting of the root fileset.
stat64(2) OSS System Calls Reference Manual Guardian st_mode Example in /G File Type File Type Permissions ___________________________________________________________________ /G vol vol/subvol vol/subvol/fileid vol/#123 ztnt ztnt/#pty0001 vol1/zyq00001 N/A Disk volume Subvolume Disk file Temporary disk file Subtype 30 process Subtype 30 process with qualifier Subvolume Directory Directory Directory Regular file Regular file Directory Character special r-xr-xr-x rwxrwxrwx rwxrwxrwx See following text Se
System Functions (s and S) stat64(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. NOTES For J06.08 and earlier J-series RVUs, H06.
stat64(2) [ENOROOT] OSS System Calls Reference Manual • The path parameter points to an empty string. • The specified pathname cannot be mapped to a valid Guardian filename. • The specified pathname points to the name of a Guardian process that is not of subtype 30. • The path parameter specifies a file on a remote HP NonStop node, but communication with the remote node has been lost. One of these conditions exists: • The root fileset of the local node (fileset 0) is not in the STARTED state.
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 and J-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) f_frsize f_blocks OSS System Calls Reference Manual 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 /E f_files f_ffree 0 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) /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. 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.
statvfs(2) f_flag OSS System Calls Reference Manual 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. 4 if fileset is read/write, 5 if fileset is readonly.
System Functions (s and S) statvfs(2) For Contains Regular file /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file. /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file. /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file. /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file.
statvfs(2) OSS System Calls Reference Manual 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.
System Functions (s and S) statvfs(2) • [ELOOP] A physical I/O error has occurred. The device holding the file might be in the down state, or both processors that provide access to the device might have failed. Data might have been lost during a transfer. Too many symbolic links were encountered in translating the path parameter.
statvfs64(2) OSS System Calls Reference Manual NAME statvfs64 - Gets fileset information using a pathname LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries SYNOPSIS #include int statvfs64( const char *path, struct statvfs64 *buffer); PARAMETERS path Is a pathname that specifies any file within a mounted fileset. buffer Points to a statvfs64 structure that is to hold the returned information for the statvfs64( ) call.
System Functions (s and S) statvfs64(2) The fields in this structure have the following meanings and content: f_bsize f_frsize f_blocks Fileset 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 Fundamental file system block size.
statvfs64(2) OSS System Calls Reference Manual /E f_bfree 0 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.
System Functions (s and S) statvfs64(2) /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.
statvfs64(2) OSS System Calls Reference Manual /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. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure. Lower 32 bits of the st_dev field in the stat structure.
System Functions (s and S) f_flag statvfs64(2) 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. 4 if fileset is read/write, 5 if fileset is readonly.
statvfs64(2) OSS System Calls Reference Manual For Contains Regular file /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file. /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file. /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file. /E/nodename/G/volume/ZXnnnnnn n, identifying the catalog file and version for the specified file.
System Functions (s and S) statvfs64(2) 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.
statvfs64(2) OSS System Calls Reference Manual • [ELOOP] A physical I/O error has occurred. The device holding the file might be in the down state, or both processors that provide access to the device might have failed. Data might have been lost during a transfer. Too many symbolic links were encountered in translating the path parameter.
System Functions (s and S) symlink(2) 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.
symlink(2) OSS System Calls Reference Manual 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. If the new name refers to an existing symbolic link, the symbolic link is destroyed. rmdir( ) An error is returned if a symbolic link is named as the path parameter. unlink( ) A symbolic link can be removed by invoking unlink( ).
System Functions (s and S) symlink(2) • Search permission is denied on a component of path2. [EEXIST] The path specified by the path2 parameter already exists. [EFAULT] Either the path1 or the path2 parameter points outside the process’s allocated address space. [EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt. [EIO] An input/output error occurred during a read from or write to the fileset. [ELOOP] Too many symbolic links were found in translating path2.
symlink(2) OSS System Calls Reference Manual [ENXIO] The fileset containing the client’s working directory or effective root directory is not mounted. [EOSSNOTRUNNING] The program attempted an operation on an object in the OSS environment while a required system process was not running. [EPERM] [EROFS] One of the following conditions exist: • The calling process does not have appropriate privileges. • The program attempted an operation on a SEEP-protected fileset. Valid for J06.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
System Functions (t) tdm_execve(2) 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"). DESCRIPTION The tdm_execve( ) function replaces the current process image with a new process image.
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: #if defined (__LP64) | | defined (_PROCEX32_64BIT) typedef struct process_extension { short pe_ver; short pe_len; int pe_pfs_size; long long pe_mainstack_max; long long pe_heap_max; long long pe_space_guarantee; char _ptr64 *pe_library_name; char _ptr64 *pe_swap_file_name; char _ptr64 *pe_extswap_file_name; char _ptr64 *pe_process_name; char _ptr64 *pe_hometerm; char _ptr64 *pe_defines; short pe_defines_len; short pe_prior
tdm_execve(2) OSS System Calls Reference Manual #endif /* !defined (__LP64) && !defined (_PROCEX32_64BIT) */ When an application is compiled in 64-bit compile mode or compiled using the #define _PROCEX32_64BIT 1 feature test macro or an equivalent compiler command option, the application will use the version of the process_extension structure that contains 64-bit data types.
System Functions (t) tdm_execve(2) _TPC_SUPPLIED_DEFINES_ONLY Propagates only the DEFINEs indicated by the pe_defines field. pe_debug_options Provides control over the selection between the default and symbolic debuggers and over the creation of the saveabend file. A saveabend file can be examined by using the symbolic debugger to determine the cause of the abnormal termination. In addition, you can use this option to force the new process to enter the default debugger before executing.
tdm_execve(2) OSS System Calls Reference Manual If a value is specified for this field for G-series TNS or accelerated object files, the specified value is ignored. 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_jobid Specifies the job ID of the new process. pe_len Specifies the size of the structure in bytes.
System Functions (t) tdm_execve(2) pe_pfs_size Specifies the size of the PFS for the new process (this field is ignored). pe_priority Specifies the priority of the new process. 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_space_guarantee Specifies the minimum available swap space to guarantee for the new process.
tdm_execve(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_execve(2) [EFAULT] An address for a parameter in the process_extension structure pointed to by pe_parms is out of allowable bounds. The Guardian PROCESS_LAUNCH_ error and error detail information is returned in the structure pointed to by the pr_results parameter, unless pr_results contains a null pointer. [EHLDSEM] The process tried to create a new process in a different processor while having at least one semadj value.
tdm_execve(2) OSS System Calls Reference Manual [ENOCPU] The selected processor does not exist, or the selected processor is down or otherwise unavailable for process creation. [ENODEV] The system cannot find the file system containing the process image file. [ENOENT] 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.
System Functions (t) tdm_execvep(2) NAME tdm_execvep - Executes a file with HP extensions LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include
tdm_execvep(2) OSS System Calls Reference Manual content of the structure. The tdmext.h header file is not kept current when new 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.
System Functions (t) tdm_execvep(2) 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.
tdm_execvep(2) OSS System Calls Reference Manual 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
System Functions (t) tdm_execvep(2) • 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.
tdm_execvep(2) • OSS System Calls Reference Manual 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.
System Functions (t) tdm_execvep(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_execvep(2) OSS System Calls Reference Manual 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.
System Functions (t) tdm_execvep(2) long pe_heap_max; long pe_space_guarantee; } process_extension_def; #endif /* !defined (__LP64) && !defined (_PROCEX32_64BIT) */ When an application is compiled in 64-bit compile mode or compiled using the #define _PROCEX32_64BIT 1 feature test macro or an equivalent compiler command option, the application will use the version of the process_extension structure that contains 64-bit data types.
tdm_execvep(2) OSS System Calls Reference Manual _TPC_PROCESS_DEFINES_ONLY Propagates only the current set of DEFINEs. _TPC_SUPPLIED_DEFINES_ONLY Propagates only the DEFINEs indicated by the pe_defines field. pe_debug_options Provides control over the selection between the default and symbolic debuggers and over the creation of the saveabend file. A saveabend file can be examined by using the symbolic debugger to determine the cause of the abnormal termination.
System Functions (t) tdm_execvep(2) 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_hometerm Points to the null-terminated name in the Guardian file system for the home terminal.
tdm_execvep(2) OSS System Calls Reference Manual pe_OSS_options Specifies OSS options. No special action on signals is the default and only current OSS option. pe_pfs_size Specifies the size of the PFS for the new process (this field is ignored). pe_priority Specifies the priority of the new process. pe_process_name Points to the null-terminated Guardian process name if _TPC_NAME_SUPPLIED is specified in the pe_name_options field.
System Functions (t) tdm_execvep(2) For detailed information about Guardian process attributes, see the PROCESS_LAUNCH_ procedure in the Guardian Procedure 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.
tdm_execvep(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. [EFAULT] An address for a parameter in the process_extension structure pointed to by pe_parms is out of allowable bounds. The Guardian PROCESS_LAUNCH_ error and error detail information is returned in the structure pointed to by the pr_results parameter, unless pr_results contains a null pointer.
System Functions (t) tdm_execvep(2) [ENOCPU] The selected processor does not exist, or the selected processor is down or otherwise unavailable for process creation. [ENODEV] The system cannot find the file system containing the process image file. [ENOENT] 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.
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 and J-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.
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: #if defined (__LP64) | | defined (_PROCEX32_64BIT) typedef struct process_extension { short pe_ver; short pe_len; int pe_pfs_size; long long pe_mainstack_max; long long pe_heap_max; long long pe_space_guarantee; char _ptr64 *pe_library_name; char _ptr64 *pe_swap_file_name; char _ptr64 *pe_extswap_file_name; char _ptr64 *pe_process_name; char _ptr64 *pe_hometerm; char _ptr64 *pe_defines; short pe_defines_len; short pe_priori
System Functions (t) tdm_fork(2) #endif /* !defined (__LP64) && !defined (_PROCEX32_64BIT) */ When an application is compiled in 64-bit compile mode or compiled using the #define _PROCEX32_64BIT 1 feature test macro or an equivalent compiler command option, the application will use the version of the process_extension structure that contains 64-bit data types.
tdm_fork(2) OSS System Calls Reference Manual _TPC_SUPPLIED_DEFINES_ONLY Propagates only the DEFINEs indicated by the pe_defines field. pe_debug_options Provides control over the selection between the default and symbolic debuggers and over the creation of the saveabend file. A saveabend file can be examined by using the symbolic debugger to determine the cause of the abnormal termination. In addition, you can use this option to force the new process to enter the default debugger before executing.
System Functions (t) tdm_fork(2) If a value is specified for this field for G-series TNS or accelerated object files, the specified value is ignored. 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_jobid Specifies the job ID of the new process. pe_len Specifies the size of the structure in bytes.
tdm_fork(2) OSS System Calls Reference Manual pe_pfs_size Specifies the size of the PFS for the new process (this field is ignored). pe_priority Specifies the priority of the new process. 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_space_guarantee Specifies the minimum available swap space to guarantee for the new process.
System Functions (t) tdm_fork(2) 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. Refer to the shmat(2) reference page for additional information about shared memory segment use.
tdm_fork(2) OSS System Calls Reference Manual 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.
System Functions (t) tdm_spawn(2) NAME tdm_spawn - Executes a new process with HP extensions LIBRARY G-series native OSS processes: /G/system/sysnn/zossksrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll SYNOPSIS #include #include
tdm_spawn(2) OSS System Calls Reference Manual 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.
System Functions (t) tdm_spawn(2) 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.
tdm_spawn(2) OSS System Calls Reference Manual 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.
System Functions (t) tdm_spawn(2) 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.
tdm_spawn(2) OSS System Calls Reference Manual 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.
System Functions (t) tdm_spawn(2) • 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.
tdm_spawn(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_spawn(2) In the current RVU, these fields are meaningful: #if defined (__LP64) | | defined (_PROCEX32_64BIT) typedef struct process_extension { short pe_ver; short pe_len; int pe_pfs_size; long long pe_mainstack_max; long long pe_heap_max; long long pe_space_guarantee; char _ptr64 *pe_library_name; char _ptr64 *pe_swap_file_name; char _ptr64 *pe_extswap_file_name; char _ptr64 *pe_process_name; char _ptr64 *pe_hometerm; char _ptr64 *pe_defines; short pe_defines_len; short pe_priori
tdm_spawn(2) OSS System Calls Reference Manual #endif /* !defined (__LP64) && !defined (_PROCEX32_64BIT) */ When an application is compiled in 64-bit compile mode or compiled using the #define _PROCEX32_64BIT 1 feature test macro or an equivalent compiler command option, the application will use the version of the process_extension structure that contains 64-bit data types.
System Functions (t) tdm_spawn(2) _TPC_SUPPLIED_DEFINES_ONLY Propagates only the DEFINEs indicated by the pe_defines field. pe_debug_options Provides control over the selection between the default and symbolic debuggers and over the creation of the saveabend file. A saveabend file can be examined by using the symbolic debugger to determine the cause of the abnormal termination. In addition, you can use this option to force the new process to enter the default debugger before executing.
tdm_spawn(2) OSS System Calls Reference Manual If a value is specified for this field for G-series TNS or accelerated object files, the specified value is ignored. 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_jobid Specifies the job ID of the new process. pe_len Specifies the size of the structure in bytes.
System Functions (t) tdm_spawn(2) pe_pfs_size Specifies the size of the PFS for the new process (this field is ignored). pe_priority Specifies the priority of the new process. 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_space_guarantee Specifies the minimum available swap space to guarantee for the new process.
tdm_spawn(2) OSS System Calls Reference Manual EXAMPLES This example uses the tdm_spawn( ) function to perform I/O redirection in a new process: if ((NewStdOut = open ("newout", ...)) != -1) /* process the error */ fd_map[0] = 0; fd_map[1] = NewStdOut; fd_map[2] = 2; fd_count = 3; tdm_spawn(..., fd_count, fd_map, ...); close(NewStdOut); This example creates a new process under a different user ID: save = getuid(); setuid(newid); tdm_spawn(...
System Functions (t) tdm_spawn(2) • The new process image file, any library file, or script file denies execution permission. • Create access on the extended swap file on a disk under Safeguard protection is denied. This error occurs only for G-series TNS or accelerated new process image files. • 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.
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) [ETXTBSY] tdm_spawn(2) The new process image file is a pure procedure (shared text) file that is currently open for writing by some process. [EUNKNOWN] Unknown error. An unrecognized or very obscure error occurred. If this error occurs, follow site-defined procedures for reporting software problems to HP.
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 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll 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) 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; char filler_3[2]; long pe_mainstack_max; long pe_heap_max; long pe_space_guarantee; } process_extension_def; #endif /*
tdm_spawnp(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) pe_defines tdm_spawnp(2) 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 TNS/E systems) is used. pe_memory_pages Specifies the size of the data stack in 2 KB units. This field is used only for Gseries TNS or accelerated new process image files. If a value is specified for this field for native object files, the specified value is checked for validity but otherwise ignored. pe_name_options Specifies process naming as: _TPC_GENERATE_NAME The system generates the name.
System Functions (t) tdm_spawnp(2) compatibility with older RVUs. Any specified value is checked for validity but otherwise ignored. pe_ver Specifies the version of the process_extension structure. This value is set by #define DEFAULT_PROCESS_EXTENSION and should not be changed. For detailed information about Guardian process attributes, see the PROCESS_LAUNCH_ procedure in the Guardian Procedure Calls Reference Manual.
tdm_spawnp(2) OSS System Calls Reference Manual ERRORS If any of the following conditions occurs, the tdm_spawnp( ) function sets errno to the corresponding value, file descriptors marked close-on-exec are not closed, signals set to be caught are not set to the default action, and none of these are changed: • The argv[ ] array of pointers • The envp[ ] array of pointers • The elements pointed to by these arrays • The value of the global variable environ • The pointers contained within the global
System Functions (t) tdm_spawnp(2) • [EIO] The new process image file is a binary executable file with invalid attributes. 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. This value is used only for errors on the object file of a loaded program or library, or during data transfer with a Guardian environment home terminal. For systems running J06.
tdm_spawnp(2) OSS System Calls Reference Manual • 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. Possible causes of this error include insufficient primary memory (stack, globals, or heap) for the new process.
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 and J-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) ulimit(2) ERRORS If any of the following conditions occurs, the ulimit( ) function sets errno to the value that corresponds to the condition. [EINVAL] [EPERM] One of the following conditions exists: • 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).
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 and J-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 and J-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 • 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. NOTES On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use this function with 32-bit or 64-bit OSS applications. RETURN VALUES Upon successful completion, the value 0 (zero) is returned.
System Functions (u) [ELOOP] unlink(2) Too many symbolic links were encountered in translating path. [ENAMETOOLONG] One of the following is too long: • The pathname pointed to by the path parameter • 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.
unlink(2) OSS System Calls Reference Manual [EROFS] The entry to be unlinked is part of a read-only fileset. [ETXTBSY] One of the following conditions exists: • The entry to be unlinked is the last directory entry to a file that is already busy. • The named file is a NonStop SQL/MP object file that is currently executing. RELATED INFORMATION Commands: rm(1). Functions: close(2), link(2), open(2), rmdir(2).
System Functions (u) utime(2) NAME utime - Sets file access and modification times LIBRARY G-series native OSS processes: system library H-series and J-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.
utime(2) OSS System Calls Reference Manual Use on Guardian Objects The utime( ) function is supported for Guardian files (that is, files within /G) that are unstructured Enscribe files. If the utime( ) function is called for a Guardian file that has a small file label, the label is expanded to include the st_atime and st_ctime fields and to mark them for update. The utime( ) function cannot be used on a file in /G that is opened for execution. A call for such a file fails and errno is set to [ETXTBSY].
System Functions (u) [ELOOP] utime(2) Too many symbolic links were encountered in translating path. [ENAMETOOLONG] One of the following is too long: • The pathname pointed to by the path parameter • 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.
utime(2) OSS System Calls Reference Manual [EROFS] The fileset that contains the file is mounted read-only. [ETXTBSY] The path parameter specifies a file in the Guardian file system (/G) that is opened for execution. RELATED INFORMATION Functions: stat(2). STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: • 9−14 The errno values [EFAULT], [EFSBAD], [EINVAL], [ENOROOT], [ENOTSUP], [ENXIO], [EOSSNOTRUNNING], and [ETXTBSY] can be returned.
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 and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include
waitpid(2) OSS System Calls Reference Manual The effect of the waitpid( ) function can be modified by the setting of the SIGCHLD signal. See the sigaction(2) reference page for details. The waitpid( ) function behaves identically to the wait( ) function if the process_id parameter has the value -1 and the options parameter has the value 0 (zero). Otherwise, its behavior is modified by the values of the process_id and options parameters.
System Functions (w) waitpid(2) WEXITSTATUS(∗∗status_location) If the value of WIFEXITED(∗∗status_location) is nonzero, evaluates to one of the following: • The lower 8 bits of the status parameter that the child process passed to the _exit( ) or exit( ) function • 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(∗∗st
waitpid(2) OSS System Calls Reference Manual Normal Self Termination When a process terminates itself, information is returned to the parent process in the location pointed to by the status_location parameter. A process terminates itself in one of the following ways: • Returning from its main( ) function. The return value is placed in ∗ status_location. • Calling the _exit( ) or exit( ) function. The exit status is placed in ∗ status_location.
System Functions (w) waitpid(2) macro to determine whether the child process terminated abnormally. The parent process can use the WCOMPLETION macro to read the completion code. See the Guardian Procedure Calls Reference Manual for details on the Guardian ABEND, STOP, and PROCESS_STOP_ procedures and on Guardian completion codes.
waitpid(2) OSS System Calls Reference Manual thread-aware in a multi-threaded application on systems running H06.21/J06.10 or later RVUs. To use this function in a 64-bit threaded application on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all of the following tasks to make the function threadaware in a multi-threaded application: • Compile the application using the _PUT_MODEL_ feature test macro or equivalent compiler command option.
System Functions (w) waitpid(2) • In addition to the status information mandated by the POSIX.1 standard, the HP implementation also returns status information for processes that terminate as a result of Guardian procedure calls. In addition, status is returned for processes that terminate abnormally as a result of a situation that is unique to HP NonStop server architecture, such as failure of the child process’s processor while the parent process continues to execute. • The POSIX.
write(2) OSS System Calls Reference Manual NAME write - Writes to a file LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include /* optional except for POSIX.
System Functions (w) write(2) bytes more in a file before reaching a limit. A write request of 512 bytes returns a value of 20. The limit reached can be either the end of the physical medium or the value that has been set by the ulimit( ) function. The next write of a nonzero number of bytes gives a failure return (except as noted later). Upon successful completion, the write( ) function returns the number of bytes actually written to the file associated with filedes.
write(2) OSS System Calls Reference Manual When attempting to write to a socket and with no space available for data: • If the O_NONBLOCK flag is not set, the write( ) function blocks until space becomes available or an error occurs. • If the O_NONBLOCK flag is set, the write( ) function returns the value -1 and sets errno to [EWOULDBLOCK].
System Functions (w) write(2) 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. ERRORS If any of these conditions occurs, the write( ) function sets errno to the corresponding value: [EAGAIN] One of these conditions exists: • An attempt was made to write to a file descriptor that cannot accept data, and the O_NONBLOCK flag is set.
write(2) [EIO] OSS System Calls Reference Manual One of these conditions occurred: • The process is a member of a background process group attempting to write to its controlling terminal, the TOSTOP flag is set, the process is neither ignoring nor blocking the SIGTTOU signal, and the process group of the process is orphaned. • A physical I/O error occurred. Data might have been lost during a transfer.
System Functions (w) write(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.
write64_(2) OSS System Calls Reference Manual NAME write64_ - Writes to a file LIBRARY G-series native OSS processes: system library H-series and J-series OSS processes: implicit libraries 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/yputdll SYNOPSIS #include #include /* optional except for POSIX.
System Functions (w) write64_(2) Upon successful completion, the write64_( ) function returns the number of bytes actually written to the file associated with filedes. This number is never greater than the value of nbytes. If the O_APPEND flag of the file status is set, the file offset is set to the end of the file prior to each write.
write64_(2) OSS System Calls Reference Manual When attempting to write to a socket and with no space available for data: • If the O_NONBLOCK flag is not set, the write64_( ) function blocks until space becomes available or an error occurs. • If the O_NONBLOCK flag is set, the write64_( ) function returns the value -1 and sets errno to [EWOULDBLOCK].
System Functions (w) write64_(2) [EFAULT] The buffer parameter points to a location outside of the allocated address space of the process. [EFBIG] The application is attempting to write at or beyond the file offset maximum established when the file was opened. [EGUARDIANLOCKED] A write64_( ) operation was attempted to a file in the Guardian file system (that is, a file in /G) that is locked. [EINTR] A write64_( ) operation was interrupted by a signal before any data was written.
write64_(2) OSS System Calls Reference Manual • An attempt was made to write to a pipe that has only one end open. • An attempt was made to write to a socket that is shut down or closed. [ETIMEDOUT] Data transmission on the socket timed out. [EWOULDBLOCK] The process attempted an operation on a socket for which O_NONBLOCK is set, there is no space available, and no error has occurred.
System Functions (w) writev(2) NAME writev - Writes to a file from scattered buffers LIBRARY G-series native OSS processes: /G/system/sysnn/zossesrl 32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zossedll 64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yossedll 32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdllnnn/zputdll 64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: /G/system/zdl
writev(2) OSS System Calls Reference Manual With devices incapable of seeking, writing always takes place starting at the current position. For such devices, the value of the file pointer after a call to the writev( ) function is always 0 (zero). Fewer bytes than requested can be written if there is not enough room to satisfy the request. In this case, the number of bytes written is returned. For example, suppose there is space for 20 bytes more in a file before reaching a limit.
System Functions (w) writev(2) • If the O_NONBLOCK flag is clear, the writev( ) function blocks until the data can be accepted or an error occurs. • If the O_NONBLOCK flag is set, the writev( ) function returns the value -1 and errno is set to [EAGAIN]. When attempting to write to a socket with no space available for data: • If the O_NONBLOCK flag is not set, the writev( ) function blocks until space becomes available or an error occurs.
writev(2) OSS System Calls Reference Manual • Compile the application using the -Wlp64 compiler command option. • Link the application to the yputdll library (/G/system/zdllnnn/yputdll). For detailed information about writing multi-threaded and 64-bit applications for the Open System Services environment, see the Open System Services Programmer’s Guide. RETURN VALUES Upon successful completion, the writev( ) function returns the number of bytes that were actually written.
System Functions (w) [EIO] writev(2) • The value of the iov_count parameter was less than or equal to 0 (zero), or greater than IOV_MAX. • 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.
writev(2) OSS System Calls Reference Manual [EWOULDBLOCK] The process attempted an operation on a socket for which O_NONBLOCK is set, there is no space available, and no error has occurred. [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.
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 5.551115123125782720e2.2204460492503131E-16 17 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, XPG4, and IEEE Std 1003.12004 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 LONG_MAX Maximum value for an object of type long int. LONG_MIN Minimum value for an object of type long int. MB_LEN_MAX Maximum number of bytes in a character for any supported locale. 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.
Files limits(4) USHRT_MAX Maximum value for an object of type unsigned short int. WORD_BIT Number of bits in a word of type int. POSIX-Defined Runtime Invariant Values (Possibly Indeterminate) The symbolic constants in the following list are defined in the limits.h header file if the application has been compiled using the _PUT_MODEL_ feature test macro or equivalent compiler command option. These symbolic names represent the maximum value for certain features.
limits(4) OSS System Calls Reference Manual _POSIX_MAX_CANON Maximum number of bytes in a terminal canonical input queue. _POSIX_MAX_INPUT Maximum number of bytes allowed in a terminal input queue. _POSIX_NAME_MAX Maximum number of bytes in a filename excluding the terminating null. _POSIX_NGROUPS_MAX Maximum number of simultaneous supplementary group IDs per process. _POSIX_OPEN_MAX Maximum number of files that a process can have open at a time.
Files limits(4) _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. _POSIX2_BC_STRING_MAX Maximum length of a string constant accepted by the bc utility.
limits(4) OSS System Calls Reference Manual 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). Use the pathconf( ) function to obtain this value at run time. NL_LANGMAX Maximum number of bytes in a LANG name.
Files limits(4) Table 11−7.
math(4) OSS System Calls Reference Manual NAME math - Specifies mathematical functions, constants, and types SYNOPSIS #include DESCRIPTION The math.h header file defines the following types: float_t Specifies a floating type at least as wide as float. double_t Specifies a floating type at least as wide as double.
Files math(4) M_LN2 Specifies the value of log to the base e of 2. M_LN10 Specifies the value of log to the base e of 10. M_LOG2E Specifies the value of log to the base 2 of e. M_LOG10E Specifies the value of log to the base 10 of e. M_PI Specifies the value of pi. M_PI_2 Specifies the value of pi divided by 2. M_PI_4 Specifies the value of pi divided by 4. M_SQRT2 Specifies the value of the square root of 2. M_SQRT1_2 Specifies the value of 1 divided by the square root of 2.
math(4) NAN OSS System Calls Reference Manual For IEEE floating-point environments only, specifies a constant expression of type float representing a quiet not-a-number (NaN). The following macros are defined for number classification. They represent mutually-exclusive kinds of floating-point values and expand to integer constant expressions with distinct values: FP_INFINITE Infinity. FP_NAN NaN. FP_NORMAL Normalized. FP_SUBNORMAL Denormalized. FP_ZERO Zero.
Files named.conf(4) NAME named.conf - configuration file for BIND 9 domain name server named DESCRIPTION named.conf is the configuration file for the named server. Within the file, directive statements are enclosed in braces and terminated with a semi-colon. Clauses in the statements are also terminated with a semi-colon. The following comment styles are supported: C style /* */ C++ style // to end of line UNIX style # to end of line Directives acl acl string { address_match_element; ...
named.conf(4) OSS System Calls Reference Manual controls controls { inet ( ipv4_address | ipv6_address | * ) [ port ( integer | * ) ] allow { address_match_element; ... } [ keys { string; ... } ]; unix unsupported; // not implemented }; logging logging { channel string { file log_file; syslog optional_facility; null; stderr; severity log_severity; print-time boolean; print-severity boolean; print-category boolean; }; category string { string; ...
Files named.
named.conf(4) OSS System Calls Reference Manual ipv6_address [port integer] ); ... } edns-udp-size integer; root-delegation-only [ exclude { quoted_string; ... } ]; disable-algorithms string { string; ... }; dnssec-enable boolean; dnssec-lookaside string trust-anchor string; dnssec-must-be-secure string boolean; dialup dialuptype; ixfr-from-differences ixfrdiff; allow-query { address_match_element; ... }; allow-transfer { address_match_element; ... }; allow-update-forwarding { address_match_element; ...
Files named.conf(4) allow-v6-synthesis { address_match_element; ...
named.
Files named.conf(4) transfer-source ( ipv4_address | * ) [ port ( integer | * ) ]; transfer-source-v6 ( ipv6_address | * ) [ port ( integer | * ) ]; alt-transfer-source ( ipv4_address | * ) [ port ( integer | * ) ]; alt-transfer-source-v6 ( ipv6_address | * ) [ port ( integer | * ) ]; use-alt-transfer-source boolean; zone-statistics boolean; key-directory quoted_string; allow-v6-synthesis { address_match_element; ...
named.conf(4) OSS System Calls Reference Manual allow-notify { address_match_element; ... }; forward ( first | only ); forwarders [ port integer ] { ( ipv4_address | ipv6_address ) [ port integer ]; ...
Files null(7) 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.
saveabend(4) OSS System Calls Reference Manual NAME saveabend - Is a file containing a memory image DESCRIPTION See the core(4) reference page.
Files signal(4) 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.
signal(4) OSS System Calls Reference Manual SIG_IGN Requests that signals be ignored. SIGSTKSZ Indicates the default size of the alternate signal stack. SS_DISABLE Indicates that the alternate signal stack is disabled. No signal handling may be launched at the alternate signal stack. SS_ONSTACK Indicates that the alternate signal stack is active. A signal handler is currently running on the alternate signal stack.
Files signal(4) If a subsequent occurrence of a pending signal is generated, it is discarded and only one instance of the same signal remains pending; however, because this action is likely to change in future releases, users should not rely on this behavior. The order in which pending signals are delivered to a process is unspecified and should not be relied upon.
signal(4) OSS System Calls Reference Manual Table 11−8.
Files signal(4) Note: The process terminates and, where possible, a saveabend (core) file is created on generation of any signal if both of the following conditions are true: • The signal was generated as a result of something other than the kill( ) or raise( ) function. • Either the signal is blocked or ignored, or the process is in operating system code when the signal is generated. The _POSIX_JOB_CONTROL symbolic constant is always defined.
signal(4) OSS System Calls Reference Manual Continue execution Restart the receiving process if it is stopped, or ignore the signal if the process is already executing. Stop process Stop the execution of the receiving process. When a process stops, a SIGCHLD signal is sent to its parent process, unless the parent process has set the SA_NOCLDSTOP bit. While a process is stopped, any additional signals that are sent to the process are not delivered until the process is continued.
Files signal(4) The signal-catching function can cause the process to resume in a different context by calling the siglongjmp( ) function. When the siglongjmp( ) function is called, the process reverts to the state saved by a corresponding call to the sigsetjmp( ) function.
signal(4) OSS System Calls Reference Manual STANDARDS CONFORMANCE The HP implementation does not provide the following signals defined in the IEEE Std 1003.1, 2004 Edition 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.
spthread.h(4) OSS System Calls Reference Manual 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.
Files spthread.h(4) wint_t spt_getwc( FILE *stream ); wint_t spt_getwchar( void ); int spt_printf( const char *format, ...
spthread.
Files spthread.
tar(4) OSS System Calls Reference Manual 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.
Files tar(4) Symbolic constants used in the header block are defined in the header file /usr/include/tar.h.
tar(4) OSS System Calls Reference Manual 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.
Files termcap(4) 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 (:).
termcap(4) OSS System Calls Reference Manual 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.
Files 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 527186-023 str num str str str num num str str str bool bool bool str str bool bool bool str str bool str bool str str str str str bool str str str num str str str str str str str str str str str str str str str (o) (NP*) (o) (o) (NP) (o) (P*) (o) (P) (NP*) (P*) (P*) Enter delete mode Milliseconds of nl delay needed (default 0) Move
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 11−54 OSS System Calls Reference Manual str str str str str str bool str num str str str str str str str str str str bool str str num str num str str str str str bool str str str str str str bool str bool str bool str bool str bool bool (o) (o) (o) (NP) (P) (o) (o) (o) (o) (o) (o) (o) (P) (o) Sent by home-down key Sent by home key Sent by insert
Files 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 527186-023 num str str str str str str str bool str str str str str str str str str str str str num str str str str str str str str str bool str str num bool str str str str str str str num str num bool (N) (o) (P) (NP) (NP*) (NP) (P) (NP*) (P) (NP*) (P) (P) (N) (o) (NP*) (N) Lowest baud where delays are required Pad character (default N
termcap(4) xn xo xr xs xt xx OSS System Calls Reference Manual bool bool bool bool bool bool (o) (o) Newline ignored after 80 columns (Concept) Terminal uses xoff/xon (DC3/2DC1) handshaking Return acts like ce cr nl (Delta Data) Standout not erased by overwriting (Hewlett-Packard terminals) Tabs ruin magic so character (Teleray 1061 terminal) Tektronix 4025 terminal insert-line A Sample Entry The following entry, which describes the Concept-100, is among the more complex entries in the termcap file a
Files termcap(4) 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.
termcap(4) OSS System Calls Reference Manual :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.
Files termcap(4) 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. Similarly, a fast way of getting to the lower left-hand corner can be given as the ll capability; this way can involve going up with the up capability from the home position, but an application should never do this itself (unless ll does), because it can make no assumption about the effect of moving up from the home position.
termcap(4) OSS System Calls Reference Manual 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.
Files termcap(4) 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.
termcap(4) OSS System Calls Reference Manual 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.
Files termcap(4) 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.
termios(4) OSS System Calls Reference Manual 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.
Files termios(4) c_oflag 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. If set, a character with a framing or parity error that is not ignored is read as the 3-character sequence 0377, 0, x, where the x variable is the data of the character received in error.
termios(4) OSS System Calls Reference Manual 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.
Files termios(4) 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. NOFLSH Disables queue flushing.
termios(4) OSS System Calls Reference Manual 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.
Files termios(4) 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: • 527186-023 BSDLY, CRDLY, FFDLY, NLDLY, OFILL, TABDLY, and VTDLY.
tty(7) OSS System Calls Reference Manual 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.
Files tty(7) 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.
tty(7) OSS System Calls Reference Manual 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.
Files tty(7) 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. IGNCR Carriage returns are ignored.
tty(7) OSS System Calls Reference Manual 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.
Files tty(7) 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.
tty(7) OSS System Calls Reference Manual 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.
acl(5) OSS System Calls Reference Manual NAME acl - Introduction to OSS access control lists (ACLs) DESCRIPTION Access control lists (ACLs) are a key enforcement mechanism of discretionary access control (see "Definitions" later in this reference page). ACLs specify access to files by users and groups more selectively than traditional UNIX mechanisms.
Miscellaneous acl(5) — The default value for the NFSPERMMAP attribute, DISABLED, specifies that all attempts by NFS clients to access OSS objects protected by ACLs that contain optional ACL entries are denied. This behavior matches the behavior for J06.08 and earlier J-series RVUs, H06.19 and earlier H-series RVUs, and Gseries RVUs. For more information about NFS and ACLs, see "OSS Network File System (NFS) and ACLs" later in this reference page.
acl(5) OSS System Calls Reference Manual -rwxr-xr-- james admin datafile For this file: • The owner is the user james. • The group is admin. • The name of the file is datafile. • The file owner permissions are rwx. • The file group permissions are r-x. • The file other permissions are r--. In an ACL, user and group IDs are represented by names or numbers, as found in the user authentication database and group database for the system.
Miscellaneous acl(5) • Members of the owning group • Any additional user entries (optional users) • Any additional group entries (members of any optional groups) The class entry is useful because it allows you to restrict the permissions for all of the other ACL entries by changing only one ACL entry. If optional user or optional group ACL entries are present, the chmod command changes the permissions of the class ACL entry instead of the permissions of the owning group.
acl(5) OSS System Calls Reference Manual _ ___________________________________________________________________________________ Notation Entry Type Description ______________________________________________________________________________ default:user::perm DEF_USER_OBJ Default permissions for the object owner default:user:uid:perm DEF_USER Default permissions for additional users specified by uid default:group::perm DEF_GROUP_OBJ Default permissions for members of the owning group of the object default:gro
Miscellaneous acl(5) USER_OBJ permissions The DEF_USER_OBJ permissions bitwise-ANDed with the mode user permissions bitwise-ANDed with the complement of the umask user permissions.
acl(5) OSS System Calls Reference Manual For security reasons, if an ACL contains default ACL entries, all of the default base ACL entries should be provided.
Miscellaneous acl(5) user:gamma:r-group::r-x group:dos:--group:tres:--class:r-x other:r-x default:user:beta:r-default:user:gamma:r-default:group:dos:--default:group:tres:--Access Check Algorithm To determine the permissions granted to an accessing process, the operating system checks for matching IDs in the following order: 1. If the EUID of the process is the same as the owner of the file, grant the permissions specified in the user:: entry of the ACL. Otherwise, continue to the next check. 2.
acl(5) OSS System Calls Reference Manual ACL Operations Supported • The acl( ) system call sets, retrieves, or counts ACLs. • The setacl command sets or modifies ACLs. • The getacl command retrieves ACLs. • The -acl option of the find command locates files with certain ACL properties. • The cp, cpio -p, mv, and pax -rw commands copy ACLs with the source files to the destination files.
Miscellaneous acl(5) The value of the NFSPERMMAP attriute specifies how the permissions for an OSS object protected by optional access control list (ACL) entries are mapped to the standard permissions bits (rwxrwxrwx) used by NFS V2 clients on open, read, write, and directory search operations. Write permissions are always enforced on the NonStop server using the actual standard OSS permissions or OSS ACL permissions (if present) on the object.
acl(5) OSS System Calls Reference Manual DISABLED Disables the mapping of OSS ACLs to NFS file permissions. When NFSPERMMAP is disabled, NFS requests to objects protected by OSS ACLs that contain optional ACL entries are denied. This behavior matches the behavior for systems running J06.08 and earlier J-series RVUs, H06.19 and earlier H-series RVUs, and G-series RVUs. This is the default value.
Miscellaneous acl(5) configuration. NFS client attempts to write to a read-only OSS fileset are reported immediately to the NFS client application. • If an OSS fileset has objects protected by optional OSS ACL entries, if you mount that fileset from NFS client systems as read-write, you must use mount options that disable write buffering.
acl(5) OSS System Calls Reference Manual * If you run this program twice on the same file, it will report * an error in aclsort() as you are trying to add a second group ACL entry * for the same group id. aclsort() points to the ACL entry in error. */ #include #include #include #include #include #include
Miscellaneous acl(5) return 1; } printAcl("Existing ACL entries", aclEnt, prevCount); /* add new GROUP acl entry at the end of the ACL */ aclEnt[ newCount-1 ].a_type = GROUP; aclEnt[ newCount-1 ].a_id = groupId; aclEnt[ newCount-1 ].
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 Specifies the principal name of the initial privileged user of the registry database (known as the "registry creator"). Used by the dce_config command during security server configuration. 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 /...
environ(5) OSS System Calls Reference Manual COPY_CONFIG_HOST Specifies the name of the virtual host to be used when copying for replica servers is performed. Used by the dce_config command. This variable is ignored unless COPY_CONFIG_INFO is set to y. If COPY_CONFIG_INFO is set to y, then COPY_CONFIG_HOST must specify the name of a virtual host that is already installed. COPY_CONFIG_INFO Specifies whether the configuration should be copied from another virtual host. Used by the dce_config command.
Miscellaneous environ(5) DCE_SCP_PROCESS_NAME Specifies the Guardian process name of the Subsystem Control Point (SCP) process to be contacted by all DCE processes in the virtual host. The default is $ZNET. If this variable is assigned a value, the $ character in the SCP process name must be preceded by the shell \ character, as in: export DCE_SCP_PROCESS_NAME=\$ZNET1 If the specified process is not responding or not running, dce_config uses the default of $ZNET.
environ(5) OSS System Calls Reference Manual DIR_REPLICATE Controls the replication of CDS directories when an additional CDS server is being created at DCE configuration time. Used by the dce_config command. Valid values are: y Causes dce_config to prompt for more directories to replicate n Suppresses further replication The default is n. 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.
Miscellaneous environ(5) EDITOR Specifies the inline editor used by the shell. If the value of this variable ends in "vi" and the VISUAL variable is not assinged a variable, the corresponding inline editor option is enabled. ELD Specifies the pathname of the TNS/E linker for PIC code used by the compiler utilities to link object and library files into an executable program or dynamic-link library when linking is requested. By default, the program eld in the directory /usr/bin is used.
environ(5) OSS System Calls Reference Manual IFS Specifies the internal field separators used in shell scripts. JAVA_HOME Specifies the pathname for the most current installed version of the NonStop Java Server environment. KEYSEED Specifies the character string used to seed the random key generator to create the master key for the master database and each slave database. Each database has its own master key and keyseed. Used in security server configuration by the dce_config command.
Miscellaneous environ(5) LAN_NAME For a multiple-LAN configuration, specifies the internal name of the LAN (in the LAN profile). Used in CDS server configuration by the dce_config command. LC_ALL Sets the locale for all categories and overrides any other locale environment variables set. See the description of LANG for locale name syntax. LC_COLLATE Sets the locale to be used for collating strings. See the description of LANG for locale name syntax.
environ(5) OSS System Calls Reference Manual MAKEFLAGS Lists the environment variables for the make utility to process. Setting a variable in MAKEFLAGS overrides the setting of that variable in the shell. MANPATH Sets the path used by the man command to look for files to display. The default pathname is /usr/share/man. MSGVERB Defines which message components are sent by the fmtmsg( ) function to the standard error file.
Miscellaneous environ(5) PATH %l The language element from the current locale name: for example, fr. %t The territory element from the current locale name: for example, BE. %c The code-set element from the current locale name: for example, ISO8859-1. %% A single % (percent sign) character. Specifies the sequence of directories, separated by colons, to be searched by the sh utility, the system command, the execvp( ) function, and so forth, when looking for an executable file.
environ(5) OSS System Calls Reference Manual REMOVE_PREV_INSTALL Indicates whether to remove all remnants of previous DCE installations before performing the new install. Valid values are: y Indicates remove all remnants n Indicates do not remove all remnants If you set this variable to y, dce_config automatically removes all installed components each time you install any component, and you must reinstall them all. Used in all component installations by the dce_config command.
Miscellaneous environ(5) SEC_SERVER Specifies the name of the machine on which the cell’s master security server runs. Used in security client configuration by the dce_config command. SHELL Specifies the full pathname of the user’s login shell. SOCKET_TRANSPORT_NAME Specifies the process name of the OSS sockets transport provider process to be used by the inetd process. SQLCFE Specifies the pathname of the embedded NonStop SQL/MP preprocessor and compiler normally invoked by the c89 utility.
environ(5) OSS System Calls Reference Manual TANDEM_ALT_SRL Controls whether the shared resource library is placed in an alternate location. This value is a Guardian filename expressed in OSS pathname format and surrounded by quotation marks: for example, "/G/volume/subvol/ldce". The default is "", meaning that the shared resource library is placed in /G/system/zdce/ldce. Used by the dce_config command. TANDEM_INSTALL_DIR Specifies the location of the pax files for installation.
Miscellaneous environ(5) HOSTFILEONLY Only /etc/hosts is checked. DNS-HOSTFILE The DNS is checked first; if the host is not found, /etc/hosts is checked. HOSTFILE-DNS /etc/hosts is checked first; if the host is not found, the DNS is checked. TERM Specifies the type of terminal for which output must be prepared. This information is used by commands, such as vi or more, that can exploit special terminal capabilities. (See the termcap(4) reference page for a list of terminal types.
environ(5) OSS System Calls Reference Manual TOTAL_CLERKS Specifies the number of CDS clerks for this host. On NonStop DCE systems, CDS clerks are shared among users (unlike some other DCE systems, which use one CDS clerk for each user ID). The default is 1. Used by the dce_config command. TZ Specifies the time zone used by the shell and by time functions to override the default timezone.
Miscellaneous environ(5) February 28 is day 59 and March 1 is day 60. You cannot refer explicitly to February 29. n The zero-based Julian day in the range 0 through 365. Leap days are counted, and you can refer to February 29. Mm.n.d The dth day (in the range 0 through 6) of week n (in the range 1 through 5) of month m of the year (in the range 1 through 12). Week 1 is the first week in which the day occurs.
environ(5) OSS System Calls Reference Manual USER Specifies the login name of the user. UPDATE_DEFAULT_LIBDCESO Specifies whether the default /usr/lib/libdce.so file should be updated with the shared run-time library being installed. Valid values are: y Indicates that the update should occur n Indicates that it should not occur The default is n. This variable can be used by the dce_config command only for TNS versions of NonStop DCE.
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.
errno(5) OSS System Calls Reference Manual [EINPROGRESS] Operation in progress. A requested operation has begun. [EINTR] Interrupted function call. An asynchronous signal was caught by the process during the execution of an interruptible function. [EINVAL] Invalid function parameter. One of the following conditions exists: [EIO] • 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.
Miscellaneous [EMSGSIZE] errno(5) Message too long. The specified message contained too many bytes. [ENAMETOOLONG] File name too long. One of the following is too long: • A pathname specified in a function call • A component of a pathname specified in a function call • The intermediate result of pathname resolution when a symbolic link is part of a pathname specified in a function call Use the pathconf( ) function to obtain the applicable system limits. [ENETDOWN] Network down.
errno(5) OSS System Calls Reference Manual [ENOMEM] Insufficient user memory. The new process image requires more memory than is allowed by the hardware or system-imposed memory management constraints. [ENOMSG] No message. There is no message of the requested type. [ENONSTOP] NonStop programming logic error exists. The program is written to use NonStop system features but has requested an operation incompatible with correct use of those features. [ENOPROTOOPT] Protocol not available.
Miscellaneous errno(5) [EOPNOTSUPP] Operation not supported on sockets. The program attempted to perform an operation that is not valid on a socket. [EOSSNOTRUNNING] Open System Services is not running or not installed. The program attempted an operation on an object in the OSS environment while a required system process was not available. [EOVERFLOW] The program attempted to perform an operation on a file at a position beyond the offset maximum established when the file was opened.
errno(5) OSS System Calls Reference Manual [ESPIPE] Invalid seek. The program attempted to access the file offset associated with a pipe or FIFO. [ESRCH] No such process or table entry. No process can be found corresponding to the given process ID. [ETANOTRUNNING] Transport agent not running. A transport-agent process for the requested socket is not running in the current processor. [ETHNOTRUNNING] OSS terminal helper process is not running.
Miscellaneous errno(5) STANDARDS CONFORMANCE The following are HP extensions to the XPG4 Version 2 specification: • 527186-023 The errno values [EBADCF], [EBIGDIR], [ECWDTOOLONG], [EDEFINEERR], [EFILEBAD], [EFSBAD], [EFSERR], [EGUARDIANLOCKED], [EGUARDIANOPEN], [EHLDSEM], [EISGUARDIAN], [EMSGQNOTRUNNING], [ENOCPU], [ENOCRE], [ENOIMEM], [ENONSTOP], [ENOROOT], [ENOTOSS], [ENOTSUP], [EOSSNOTRUNNING], [ESPIERR], [ETANOTRUNNING], [ETHNOTRUNNING] [EUNKNOWN], and [EWRONGID] are supported.
filename(5) OSS System Calls Reference Manual NAME filename, pathname - Explains 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/nod
Miscellaneous filename(5) 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 (. , called dot), then filename_1 indicates the OSS current working directory.
filename(5) OSS System Calls Reference Manual 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.
Miscellaneous • filename(5) 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 (\).
filename(5) OSS System Calls Reference Manual 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.
Miscellaneous filename(5) • 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.
filename(5) OSS System Calls Reference Manual 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.
Miscellaneous hier(5) 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.
hier(5) OSS System Calls Reference Manual 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.
Miscellaneous login.defs(5) NAME login.defs - The default login configuration file for the user management suite on OSS. DESCRIPTION The /etc/login.defs file contains the default values for login configurable variables used in the user and alias management utilities. The default values are used in the absence of user-specified values. The login.defs.sample file provides examples for setting variables. FILE FORMAT The file consists of variable, value duple entries.
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 typedef struct process_extension_results { long pr_len; short pr_phandle[10]; long pr_pid; long pr_errno; short pr_TPCerror; short pr_TPCdetail; } process_extension_results_def; #endif /* ! __LP64 */ 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.
Miscellaneous process_extension_results(5) tdm_spawnp( ). _TPC_BAD_DEFINES The pointer to the pe_defines 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_ENVIRON One of the pointers in the environ array is invalid. Issued for: tdm_execve( ), tdm_execvep( ), tdm_spawn( ), tdm_spawnp( ).
process_extension_results(5) OSS System Calls Reference Manual _TPC_BAD_INHERIT The pointer to the inherit structure parameter of the calling function is invalid. Issued for: tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_INTERNAL 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_OUTPUT An internal OSS software error occurred.
Miscellaneous process_extension_results(5) _TPC_BAD_PROCESS_NAME The pointer to the pe_process_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_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.
process_extension_results(5) OSS System Calls Reference Manual _TPC_BAD_DEBUG_OPTIONS The pe_debug_options 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_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( ).
Miscellaneous process_extension_results(5) _TPC_BAD_INTERPRETER The shell script contained in the text file pointed to by the file parameter of the calling function does not have an interpreter name in its #! header line. Issued for: tdm_execve( ), tdm_execvep( ), tdm_spawn( ), tdm_spawnp( ). _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.
process_extension_results(5) OSS System Calls Reference Manual _TPC_BAD_PFS_SIZE The pe_pfs_size 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_PIMFILE An internal OSS software error occurred. If the problem persists, follow site-defined procedures for reporting software problems to HP.
Miscellaneous process_extension_results(5) _TPC_BAD_UC The file parameter value of the calling function cannot be resolved into a valid program file name. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ). _TPC_BAD_UL The pe_library_name field value of the calling function cannot be resolved into a valid library file name. Issued for: tdm_execve( ), tdm_execvep( ), tdm_fork( ), tdm_spawn( ), tdm_spawnp( ).
resolv.conf(5) OSS System Calls Reference Manual NAME resolv.conf - BIND 9 Domain Name System resolver configuration file DESCRIPTION The default configuration file /etc/resolv.conf provides an explicit default domain name for the Domain Name System (DNS) to use, and identifies name servers on other processors. The BIND 9 resolver system can be used with other, nondefault versions of resolv.conf. Each entry in a resolv.
Miscellaneous resolv.conf(5) might be slow and generates a lot of network traffic if the servers for the listed domains are not local. Queries time out if no server is available for one of the domains. The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance takes precedence. sortlist addresslist Allows addresses returned by internal function calls to be sorted. An addresslist is specified by IP address netmask pairs.
resolv.conf(5) OSS System Calls Reference Manual RELATED INFORMATION Commands: dnssec_named(8), named(8). Functions: gethostbyaddr(3), gethostbyname(3), gethostbyname2(3), setnetent(3). Files: hosts(4), networks(4), protocols(4), resolv.conf(4), services(4).
Miscellaneous users(5) NAME users - The default user configuration file for the user management suite on OSS. DESCRIPTION The /etc/default/users file contains the default values for configurable variables used in the user and alias management utilities. The default values are used in the absence of user-specified values. You must create and customize this file for your site-specific needs. The users.sample file provides examples for setting variables.
Permuted Index _____________________________ spt_fputwc: Thread-aware fputwc( required by spt_regFileIOHandler( spt_fputc: Thread-aware fputc( required by spt_regTimerHandler( /Initiates thread-aware select( /Initiates thread-aware select( /Initiates thread-aware select( spt_closez: Initiates close( 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-awa
OSS System Calls Reference Manual socket accept: socket/ spt_acceptx: utime: Sets file information for a file acl: Sets acl: Introduction to OSS accessibility of a file access: Determines the /Excludes other users from /Excludes other users from disk/ /Excludes other users from disk/ /Excludes other users from acl: Sets access control list control lists (ACLs) (ACL) information for a file to OSS access control lists signal sigaction: Specifies the spt_sigaction: Specifies the existing file/ link: Creates an
Permuted Index /TMF transaction handle to be thread /Suspends a transaction /TMF transaction handle to be thread /Suspends a transaction previously suspended transaction previously suspended transaction to the address space of/ shmat: the status of a process creation mutex but/ pthread_mutex_trylock: pthread_getattr_np: Gets the mutex type attribute of a mutex mutex type attribute of a mutex object /Gets the mutex type object /Sets the mutex type object /Obtains the mutex type object /Sets the mutex type ob
OSS System Calls Reference Manual spt_wakeup: Wakes up a thread put_awaitio: spt_awaitio: /socket connections and limits the /configuration file for resolver/ resolv.
Permuted Index for a/ pthread_cond_timedwait: specified/ pthread_cond_wait: for the/ pthread_join: for a signal sigwait: for a signal spt_sigwait: ftruncate: ftruncate64: version) spt_ftruncate64z: version) spt_ftruncatez: chmod: fchmod: lchmod: mask sigprocmask: pthread_sigmask: Examines or directory chdir: directory chroot: of a file chown: of a file fchown: of a file lchown: of the calling process nice: signals and waits/ sigsuspend: signals and/ spt_sigsuspend: an interprocess communication input/ spt_f
OSS System Calls Reference Manual /Initializes the tfile for errno: Returns the error pthread_cond_destroy: Destroys a pthread_cond_init: Initializes a that are waiting on the specified object /Destroys a object /Initializes a /that is waiting on the specified that is waiting on the specified or/ /a thread to wait either for a /thread to wait for the specified 9 Domain Name System resolver domain name server/ named.conf: login.
Permuted Index environment or rewrites/ creat64: /a file for reading or writing; /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 Gets the effective user ID of the Gets the group list of the Gets the the real user ID of the to another thread in the scheduling/ /Obtains the Gets information identi
OSS System Calls Reference Manual Marks a thread object for pthread_testcancel: Requests /Specifies the action to take upon Specifies the action to take upon Schedules an alarm signal for file format ar: archive file format cpio: archive file format tar: directories dir: and decimal ASCII/ ascii: database termcap: for POSIX compatibility termios: close: Closes a file dup: Duplicates an open file /Sets interest in file /Unregisters an OSS file /Sets interest in file /Unregisters an OSS file and controls an o
Permuted Index random processing of records in a random processing of records in a of records in a Guardian of records in a Guardian and reads records in a Guardian and reads records in a Guardian /Reads data from a Guardian /Reads data from a Guardian /to lock a specified mutex but /configuration file for BIND 9 resolv.
OSS System Calls Reference Manual 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 argv ar
Permuted Index storage/ /Writes modified data and System resolver configuration the owner and group IDs of a an application process and a an application process and a core: Is a saveabend: Is a a pathname to a character special /disk file and any records in that /disk file and any records in that application program to a Guardian application program to a Guardian close: Closes a dup: Duplicates an open /Waits on read-ready /Waits on write-ready /Sets interest in /Unregisters an OSS /Waits on read-ready /Wai
OSS System Calls Reference Manual /or writing; creates a regular creat: Creates a regular creat64: Creates a regular readv: Reads from a spt_readvx: Reads from a spt_readvz: Reads from a the owner and group IDs of a ftruncate: Changes ftruncate64: Changes spt_ftruncate64z: Changes version) spt_ftruncatez: Changes about a symbolic link or any Sets and gets the value of the Explains OSS file system put_regFile: Registers the /Registers the spt_regFile: Registers the /Registers the manages /Unregisters a Guard
Permuted Index array, and/ execv: Executes a array, and an/ execve: Executes a tdm_execve: Executes a tdm_execvep: Executes a chmod: Changes fchmod: Changes lchmod: Changes execlp: Executes a file using a execvp: Executes a file using a system file naming /Registers $RECEIVE /Registers $RECEIVE Registers $RECEIVE Registers $RECEIVE ioctl: Controls device an existing file on the current file fstatvfs: Gets file fstatvfs64: Gets pathname statvfs: Gets pathname statvfs64: Gets /Sets device-dependent Guardian /
OSS System Calls Reference Manual a file (Guardian 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 fprintf( ) Initiates thread-aware fputs( ) Initiates thread-aware fread( ) Initiates thread-aware fwrite( ) Initiates thread-aware getc( ) Executes thread-aware getch
Permuted Index input stream/ spt_fgetcx: input stream/ spt_getcx: standard input/ spt_getcharx: (thread-aware/ spt_fgetsx: input stream/ spt_getsx: specified input/ spt_getwcx: specified input/ spt_fgetwcx: standard input/ spt_getwcharx: (thread-aware/ spt_getwx: gettimeofday: ulimit: Sets and open file fstatvfs: open file fstatvfs64: pathname statvfs: pathname statvfs64: current system uname: pthread_getconcurrency: getsockopt: thread pthread_getattr_np: attribute/ pthread_attr_getscope: handle PUT_TMF_Get
OSS System Calls Reference Manual lchown: Changes the owner and Sets the real and effective setgroups: Sets the getgroups: Gets the Sends a signal to a process or random processing of records in a random processing of records in a other users from accessing a other users from accessing a from accessing a record in a from accessing a record in a locks and reads records in a locks and reads records in a anticipation/ /Reads data from a anticipation/ /Reads data from a PUT_FILE_CLOSE_: Closes an open SPT_FILE_
Permuted Index seteuid: Sets the effective user setgid: Sets the group setuid: Sets the user geteuid: Gets the effective user getuid: Gets the the real user getsid: Gets the process group /Creates a new semaphore set and sets the process group msgget: Creates or returns the /memory segment or returns the pthread_self: Obtains the thread Compares two thread uname: Gets information Changes the owner and group Changes the owner and group Changes the owner and group Sets the real and effective group Sets the re
OSS System Calls Reference Manual for reading/ put_RECEIVEREADL: for reading/ spt_RECEIVEREAD: for reading/ spt_RECEIVEREADL: function spt_fwrite: function spt_getc: function spt_gets: function spt_getw: function spt_getwc: ) function spt_getwchar: function spt_printf: function spt_putc: function spt_putchar: function.
Permuted Index a Guardian file opened for nowait /about an open file (serializes /about an open file (serializes /or write operation (serializes /or write operation (serializes Interrupts thread awaiting tagged Wakes up a thread awaiting tagged Interrupts thread awaiting tagged Wakes up a thread awaiting tagged Sets the process group ID for a unique thread-specific data data associated with a Deletes a thread-specific data data associated with a or group of processes /Registers $RECEIVE filename /function f
OSS System Calls Reference Manual a symbolic link or any file about a symbolic link or any/ pthread_cleanup_push: pthread_cleanup_pop: /Registers the file descriptor to /Registers the file descriptor to tfile for concurrent transaction tfile for concurrent transaction configuration file for the user configuration file for the user file number as one that the user 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 signa
Permuted Index a pathname to a character/ and gets the value of the file utime: Sets file access and to permanent/ fsync: Writes to permanent/ spt_fsyncz: Writes operations identifier for a message queue message queue message queue /select( ) function for for synchronous input/output pthread_mutex_destroy: Destroys a pthread_mutex_init: Initializes a pthread_mutex_unlock: Unlocks a the mutex type attribute of a the mutex type attribute of a /Destroys a /Initializes a the mutex type attribute of a the mutex
OSS System Calls Reference Manual pthread_detach: Marks a thread attribute of a thread attributes attribute of a mutex attribute a condition variable attributes attribute of a thread attributes attribute of a thread attributes attribute of a thread attributes attribute of a mutex attributes attribute of a thread attributes attribute of a thread attributes attribute of a thread attributes Destroys a thread attributes Initializes a thread attributes Initializes a mutex attributes attribute of a thread attribu
Permuted Index in the application program to an PUT_READX: Returns data from an SPT_READX: Returns data from an or writing; creates a regular/ operation on a Guardian file operation on a Guardian file for/ /data to a process previously writing; creates a regular/ open: writing; creates a/ open64: file offset for read or write file offset for read or write /Cancels the oldest incomplete /Cancels the oldest incomplete file offset for read or write file offset for read or write Initiates a thread-aware fork()
OSS System Calls Reference Manual fchown: Changes the lchown: Changes the socketpair: Creates a /Formats a variable number of /Formats a variable number of scheduling policy and scheduling scheduling policy and scheduling policy/ /Obtains the scheduling policy/ /Sets the scheduling getppid: Gets the /Establishes a communication /Establishes a communication Explains OSS file system execl: Executes a file using a execle: Executes a file using a execv: Executes a file using a execve: Executes a file using a sy
Permuted Index /Initiates thread-aware REPLYXL /Initiates thread-aware REPLYXL Initiates thread-aware REPLYX Initiates thread-aware REPLYX _exit: Terminates a fork: Creates a new path between an application path between an application to be transferred back from the thread’s process forks a child priority of the calling /Contains the status of a Guardian file to the application Guardian file to the application /data from a Guardian disk or /data from a Guardian disk or called when the calling thread’s effec
OSS System Calls Reference Manual open file/ spt_fstat64z: open file/ spt_fstatz: fork-handler routines to be/ thread attributes object Obtains the detachstate/ Obtains the guardsize attribute/ Obtains the guardsize attribute/ Obtains the inherit scheduling/ Obtains the scheduling/ Obtains the scheduling policy/ contentionscope attribute of a/ Obtains the stackbase address/ Obtains the stacksize attribute/ thread attributes object the detachstate attribute of a/ the guardsize attribute of a/ Sets the guards
Permuted Index calling thread’s cancelability/ level of concurrency scheduling policy and scheduling/ thread-specific data associated/ changes the calling thread’s/ Cancels a thread if a specified/ delivery of a pending/ the threads global mutex file spt_putc: Initiates thread-aware incomplete operation on a/ Initiates thread-aware device-dependent input/output/ read-ready file descriptor write-ready file descriptor Guardian file communication path between an/ to a process previously opened/ returns a stati
OSS System Calls Reference Manual Sends a message to a message PUT_READUPDATELOCKX: Allows PUT_WRITEUPDATEUNLOCKX: Performs SPT_READUPDATELOCKX: Allows SPT_WRITEUPDATEUNLOCKX: Performs spt_read: Initiates thread-aware an array and waits for data to be an array and waits for data to be lseek: Sets file offset for lseek64: Sets file offset for (serializes/ /Sets file offset for spt_lseekz: Sets file offset for regular/ open: Opens a file for open64: Opens a file for thread-aware function for thread-aware fun
Permuted Index user /Unlocks a Guardian file /other users from accessing a /other users from accessing a /Performs random processing of /Performs random processing of /Sequentially locks and reads /Allows random processing of /Sequentially locks and reads /Allows random processing of /Unlocks a disk file and any /Unlocks a disk file and any spt_recv: Initiates thread-aware connected socket a connected socket /Initiates thread-aware from a socket from a socket a socket using a message/ Initiates thread-aware
OSS System Calls Reference Manual put_generateTag: Increments and spt_generateTag: Increments and Guardian file to the/ PUT_READX: Guardian file to the/ SPT_READX: errno: /Creates a new semaphore set ID or message queue msgget: Creates or /a new shared memory segment or a/ sched_get_priority_max: a/ sched_get_priority_min: /file in the OSS environment or /file in the OSS environment or chroot: Changes the effective /Removes the cleanup-handler single/ pthread_once: Calls a /Establishes a cleanup-handler onl
Permuted Index connected socket Initiates thread-aware socket using a message structure socket using a message structure socket send: socket send64_: socket (thread-aware/ spt_sendx: sendto: sendto64_: (thread-aware/ spt_sendtox: a message structure sendmsg: a message structure sendmsg64_: a message/ spt_sendmsgx: queue msgsnd: group of processes kill: pthread_kill: Initiates thread-aware socket socket records in a/ PUT_READLOCKX: records in a/ SPT_READLOCKX: /information about an open file /information abo
OSS System Calls Reference Manual SPT_TMF_SetAndValidateTxHandle: a/ pthread_attr_setdetachstate: the calling process setegid: calling process seteuid: process setgid: calling process setgroups: pthread_attr_setguardsize: pthread_attr_setguardsize_np: pthread_attr_setinheritsched: a/ pthread_mutexattr_setkind_np: a/ pthread_mutexattr_settype: socket_transport_name_set: put_setTMFConcurrentTransactions: spt_setTMFConcurrentTransactions: and decimal ASCII character setpgrp: setsid: Creates a new session and c
Permuted Index the processor to/ sched_yield: /Changes the set of blocked /Changes the set of blocked pending spt_sigpending: Examines signals the signal mask blocked signals and waits for a/ thread to wait for a signal /select( ) function for a /select( ) function for a routine to be executed once by a null: Is a data ulimit: Sets and gets file socket is at the out-of-band/ bind: Binds a name to a connect: Connects a sendto: Sends a message on a sendto64_: Sends a message on a Accepts a new connection on a
OSS System Calls Reference Manual spt_putcx: Writes a byte to a /Cancels a thread if a /Cancels a thread if a /Writes a wide character to a /Writes a wide character to a object /address attribute of the execution of the thread for a execute a file exec: constants, and types math: delivery of a signal sigaction: delivery of a/ spt_sigaction: limits: floating-point operations float: thread-aware accept( ) function connection on a socket/ signal for delivery to a process/ file incomplete operation on a/ close(
Permuted Index gets( ) function standard input stream/ Gets the number of concurrent/ getw( ) function getwc( ) function thread-aware getwchar( )/ character from the standard/ from a specified input stream/ input stream (thread-aware/ file $RECEIVE filename $RECEIVE filename (larger/ threads awaiting input or output thread awaiting tagged I/O users from accessing a Guardian/ from accessing a record in a/ for read or write operation/ read or write operation/ callback type required by the/ until a signal is r
OSS System Calls Reference Manual send( ) function thread-aware sendmsg( ) function a socket using a message/ thread-aware sendto( ) function socket (thread-aware version) connected socket (thread-aware/ device-dependent Guardian/ interest in file descriptor Sets the number of concurrent/ action to take upon delivery of/ handler that are blocked and pending of blocked signals and waits for/ thread to wait for a signal the thread for a specified time/ thread-aware system( ) function callback type required by
Permuted Index /and file attributes to permanent and file attributes to permanent character to the standard output /output to the standard output spt_fclosex: Closes a spt_fflushx: Flushes a spt_fgetsx: Gets a string from a /from a a specified input /formatted output to an output /a byte to a specified output spt_fputsx: Writes a string to a /a wide character to a specified spt_freadx: Reads input from a spt_fwritex: Writes to an output /a string from the standard input /character from the standard input /c
OSS System Calls Reference Manual the user-supplied Pathsend the user-supplied Pathsend and returns a static long the user-supplied Pathsend the user-supplied Pathsend put_awaitio: Awaits a spt_awaitio: Awaits a Interrupts thread awaiting Wakes up a thread awaiting Interrupts thread awaiting Wakes up a thread awaiting tar: Describes the extended archive file format HP extensions HP extensions with HP extensions with HP extensions process with HP extensions capability database termcap: Describes the tty: Is
Permuted Index received /Cancels a /to yield the processor to another pthread_detach: Marks a request to the calling Delays execution of a Terminates the calling Gets the attribute object for a thread identifier of the calling /Gets the associated with the current associated with the current associated with the current associated with the current pthread_cancel: Requests that a /routine to be executed when the specified/ /Unblocks at least one specified condition/ /Unblocks one and scheduling parameters of
OSS System Calls Reference Manual spt_recvfrom: Initiates spt_recvmsg: Initiates call put_REPLYX: Initiates call spt_REPLYX: Initiates call/ put_REPLYXL: Initiates call/ spt_REPLYXL: Initiates put_select_single_np: Initiates for/ spt_select: Initiates spt_select_single_np: Initiates spt_send: Initiates spt_sendmsg: Initiates spt_sendto: Initiates spt_system: Initiates /Closes a file descriptor spt_connectx: Connects a socket spt_fclosex: Closes a stream /Controls open file descriptors /Controls open file de
Permuted Index spt_write: Initiates spt_writev: Initiate put_interrupt: Interrupts all 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/ /Unblocks all pthread_getspecific: Obtains the pthread_setspecific: Sets the /Generates a unique pthread_key_delete: Deletes a /Registers a user-supplied /Registers a user-supplied Sets file access and m
OSS System Calls Reference Manual pthread_cond_signal_int_np: a set of argument strings, and an pthread_key_create: Generates a from the OSS environment pthread_mutex_lock: Locks an records in that/ PUT_UNLOCKFILE: records in that/ SPT_UNLOCKFILE: currently locked/ PUT_UNLOCKREC: currently locked/ SPT_UNLOCKREC: pthread_mutex_unlock: pthread_unlock_global_np: number as one/ put_unregFile: number as one/ spt_unregFile: put_unregOSSFileIOHandler: spt_unregOSSFileIOHandler: put_unregPathsendTagHandler: spt_unr
Permuted Index /Initializes a condition /on the specified condition output/ spt_vfprintfx: Formats a output/ spt_vprintfx: Formats a Destroys a condition Initializes a condition on the specified condition on the specified condition /to wait either for a condition wait for the specified condition signal: Contains definitions and output stream (thread-aware output stream (thread-aware output stream (thread-aware on a socket (thread-aware a specified stream (thread-aware a specified stream (thread-aware file d
OSS System Calls Reference Manual scattered buffers (thread-aware /Initiates thread-aware Initiates thread-aware variable to/ /Causes a thread to Causes the calling thread to Causes the calling thread to variable to/ /Causes a thread to /Causes the calling thread to /a specified mutex but does not to terminate /Unblocks all threads that are /at least one thread that is /Unblocks one thread that is Initiates thread-aware child process to stop or/ the set of blocked signals and the set of blocked signals and
Permuted Index attributes to/ spt_fsyncz: write: write64_: buffers/ spt_writevx: buffers/ spt_writevz: buffers writev: version) spt_writex: version) spt_writez: (thread-aware/ spt_fwritex: spt_writev: Initiate thread-aware scattered buffers in/ /Opens a file for reading or in/ /Opens a file for reading or thread/ /Signals a willingness to 527186-023 Writes modified data and file ........................................ spt_fsyncz(2) Writes to a file ........................................................
Index _____________________________ Symbols B /etc/named.
OSS System Calls Reference Manual on a message queue, 4-59 on semaphores, 7-15 on shared memory, 7-80 core file, 11-3 core memory image, 11-3 cpio archive file, 11-4 to 11-6 cpio file format, 11-4 to 11-6 creat function, 1-43 to 1-50 creat64 function, 1-51 to 1-57 current working directory, changing, 1-18 D data sink file, 11-29 decimal ASCII character set, 12-17 default mutex, 5-143, 5-150 descriptors.
Index ECOBFE, 12-22 EDITOR, 12-23 ELD, 12-23 EMS_COLLECTOR, 12-23 ENV, 12-23 EXINIT, 12-23 EXIT_ON_ERROR, 12-23 FCEDIT, 12-23 FPATH, 12-23 Guardian PARAMs, 12-23 HISTFILE, 12-23 HISTSIZE, 12-23 HOME, 12-23 HOST_NAME_IP, 12-23 IFS, 12-24, 12-34 JAVA_HOME, 12-24 KEYSEED, 12-24 LANG, 12-24 LAN_NAME, 12-25 LC_ALL, 12-25 LC_COLLATE, 12-25 LC_CTYPE, 12-25 LC_MESSAGES, 12-25 LC_MONETARY, 12-25 LC_NUMERIC, 12-25 LC_TIME, 12-25 LD, 12-25 LOCPATH, 12-25 LOGNAME, 12-25 LOG_THRESHOLD, 12-25 MAKEFLAGS, 12-26 MANPATH, 12
OSS System Calls Reference Manual USE_DEF_MSG_PATH, 12-33 UTILSGE, 12-34 VISUAL, 12-34 ZCPU, 12-34 _RLD_FIRST_LIB_PATH, 12-28 _RLD_LIB_PATH, 12-28 errno external variable, 12-35 to 12-43 errno value [E2BIG], 2-8, 2-16, 2-24, 2-32, 2-40, 2-48, 4-67, 7-25, 8-14, 8-29, 8-56, 8-74, 12-35 [EACCES], 1-7, 1-12, 1-15, 1-19, 1-24, 1-28, 1-32, 1-39, 1-47, 1-55, 2-8, 2-16, 2-24, 2-32, 2-40, 2-48, 3-23, 4-8, 4-12, 4-16, 4-36, 4-46, 4-50, 4-56, 4-60, 4-64, 4-67, 4-71, 5-11, 5-22, 6-13, 6-48, 6-53, 7-18, 7-21, 7-25, 7-36
Index 7-444, 7-447, 7-469, 7-475, 7-485, 7-491, 8-57, 8-74, 10-17, 10-22, 10-28, 12-35 [EBADMSG], 12-35 [EBADSYS], 12-35 [EBIGDIR], 12-36 [EBUSY], 6-49, 6-54, 9-8, 12-36 [ECHILD], 10-6, 10-12, 12-36 [ECONNABORTED], 1-4, 7-132, 12-36 [ECONNREFUSED], 1-39, 7-148, 12-36 [ECONNRESET], 1-4, 1-15, 1-40, 3-16, 3-76, 3-86, 3-92, 4-20, 6-5, 6-10, 6-18, 6-23, 6-25, 6-29, 6-32, 6-37, 6-41, 7-29, 7-32, 7-36, 7-41, 7-46, 7-51, 7-75, 7-90, 7-112, 7-132, 7-148, 7-163, 7-171, 7-340, 7-345, 7-356, 7-360, 7-371, 7-375, 7-378
OSS System Calls Reference Manual 7-513, 7-535, 9-8, 9-12, 12-37 [EFSERR], 12-37 [EGUARDIANLOCKED], 7-469, 7-475, 7-486, 7-491, 10-17, 10-23, 10-28, 12-37 [EGUARDIANOPEN], 1-47, 1-55, 5-11, 5-23, 6-49, 9-8, 12-37 [EHAVEOOB], 12-37 [EHLDSEM], 8-15, 8-30, 8-42, 8-57, 8-74, 12-37 [EHOSTDOWN], 12-37 [EHOSTUNREACH], 1-40, 7-46, 7-51, 7-148, 7-405, 12-37 [EIDRM], 4-67, 4-71, 7-25, 12-37 [EILSEQ], 7-211, 7-222, 7-304, 7-321, 7-323, 7-444, 7-448, 12-37 [EINPROGRESS], 1-40, 7-148, 12-38 [EINTR], 1-4, 1-8, 1-40, 1-47
Index 4-50, 4-56, 5-12, 5-23, 6-5, 6-10, 6-13, 6-18, 6-30, 6-33, 6-37, 6-42, 6-54, 7-29, 7-32, 7-37, 7-42, 7-47, 7-51, 7-58, 7-142, 7-144, 7-149, 7-158, 7-178, 7-181, 7-184, 7-211, 7-215, 7-219, 7-222, 7-225, 7-247, 7-251, 7-253, 7-257, 7-263, 7-265, 7-268, 7-278, 7-304, 7-309, 7-312, 7-316, 7-321, 7-323, 7-325, 7-341, 7-346, 7-356, 7-361, 7-371, 7-376, 7-399, 7-405, 7-408, 7-444, 7-448, 7-469, 7-475, 7-486, 7-491, 7-502, 7-513, 7-522, 7-531, 7-535, 8-15, 8-30, 8-42, 8-57, 8-75, 9-8, 9-12, 10-18, 10-23, 10-
OSS System Calls Reference Manual 7-244, 7-247, 7-251, 7-254, 7-341, 7-346, 7-357, 7-361, 7-405, 7-409, 7-470, 7-476, 7-486, 7-491, 10-18, 10-23, 10-29, 12-39 [ENETRESET], 12-39 [ENETUNREACH], 1-41, 7-29, 7-32, 7-47, 7-51, 7-149, 7-406, 12-39 [ENFILE], 1-4, 1-48, 1-56, 5-12, 5-24, 5-28, 7-117, 7-121, 7-133, 12-39 [ENOBUFS], 1-4, 1-16, 1-41, 3-77, 3-86, 3-92, 4-20, 6-23, 6-25, 6-30, 6-33, 6-37, 6-42, 7-29, 7-32, 7-37, 7-42, 7-47, 7-51, 7-75, 7-90, 7-112, 7-117, 7-121, 7-133, 7-149, 7-371, 7-376, 7-378, 7-399
Index 12-40 [ENOSPC], 1-12, 1-48, 1-56, 4-17, 4-51, 4-57, 4-64, 5-13, 5-25, 6-50, 7-22, 7-26, 7-88, 7-178, 7-211, 7-215, 7-219, 7-222, 7-225, 7-257, 7-304, 7-309, 7-312, 7-316, 7-321, 7-323, 7-325, 7-444, 7-448, 7-470, 7-476, 7-486, 7-491, 7-535, 10-18, 10-23, 10-29, 12-40 [ENOSPEC], 7-158 [ENOSYS], 1-13, 12-40 [ENOTCONN], 3-77, 6-6, 6-11, 6-19, 6-23, 6-25, 6-30, 6-33, 6-37, 6-42, 7-29, 7-33, 7-38, 7-42, 7-47, 7-52, 7-91, 7-341, 7-346, 7-357, 7-361, 7-371, 7-376, 7-379, 7-399, 7-406, 7-409, 7-470, 7-476, 7-
OSS System Calls Reference Manual 7-29, 7-33, 7-38, 7-42, 7-47, 7-52, 7-122, 7-133, 7-371, 7-376, 7-379, 7-399, 7-406, 7-409, 12-41 [EOSSNOTRUNNING], 1-8, 1-20, 1-25, 1-29, 1-33, 1-49, 1-57, 3-5, 3-10, 4-9, 4-13, 4-17, 4-37, 4-47, 4-51, 4-57, 5-14, 5-25, 5-28, 6-14, 6-50, 6-55, 7-503, 7-514, 7-536, 9-9, 9-13, 12-41 [EOVERFLOW], 1-49, 3-18, 3-33, 3-52, 4-24, 4-27, 5-14, 6-6, 6-11, 6-19, 7-172, 7-245, 7-292, 7-294, 7-346, 7-361, 7-503, 7-523 [EPARTIAL], 12-41 [EPERM], 1-8, 1-12, 1-16, 1-20, 1-25, 1-29, 1-33,
Index [EVERSION], 12-42 [EWOULDBLOCK], 1-4, 1-41, 6-6, 6-11, 6-19, 6-23, 6-26, 6-30, 6-33, 6-38, 6-42, 7-29, 7-33, 7-38, 7-43, 7-48, 7-52, 7-133, 7-346, 7-361, 7-371, 7-376, 7-379, 7-400, 7-406, 7-409, 7-476, 7-492, 10-18, 10-24, 10-30, 12-42 [EWRONGID], 1-59, 1-62, 3-18, 3-33, 3-44, 3-52, 3-60, 3-63, 3-100, 4-24, 4-27, 6-6, 6-11, 6-19, 7-154, 7-164, 7-172, 7-235, 7-245, 7-247, 7-292, 7-295, 7-341, 7-346, 7-357, 7-361, 7-470, 7-476, 7-487, 7-492, 10-18, 10-24, 10-30, 12-42 [EXDEV], 4-18, 6-51, 12-42 [EXDRDE
OSS System Calls Reference Manual S_IFCHR, 3-26, 3-37, 4-30, 4-40, 7-228, 7-238, 7-496, 7-507 S_IFDIR, 3-26, 3-37, 4-30, 4-40, 4-49, 7-228, 7-238, 7-496, 7-507 S_IFIFO, 3-26, 3-37, 4-30, 4-41, 7-228, 7-238, 7-496, 7-507 S_IFREG, 1-45, 1-53, 3-26, 3-37, 4-30, 4-41, 5-8, 5-20, 7-228, 7-238, 7-496, 7-507 S_IFSOCK, 3-26, 3-37, 4-30, 4-41, 7-228, 7-238, 7-496, 7-507 S_ISVTX, 1-22, 1-45, 1-53, 3-3, 3-27, 3-38, 4-6, 4-31, 4-41, 4-49, 5-8, 5-20, 7-229, 7-239, 7-497, 7-508 S_NONSTOP, 5-8, 5-20 filename, 12-44 to 12-
Index process snapshot, 11-3 propagating open, 8-4, 8-20, 8-46, 8-63 providing information about, 3-24, 3-35, 4-28, 4-38, 7-226, 7-236, 7-494, 7-505 read-write offset setting, 4-22, 4-25, 7-290, 7-293 reading from, 6-2, 6-8, 6-15, 7-338, 7-343, 7-354, 7-358 removing a link from, 9-7 renaming, 6-43, 6-44, 6-46 saveabend, 10-3, 10-9, 11-3 setting access and modification times, 9-11 setting and getting creation mask value, 9-4 sharing Guardian, 3-22, 8-41, 8-46, 8-64 signal, 11-31 size, 9-2 status flags.
OSS System Calls Reference Manual setting for process, 7-63 setting real and effective, 7-59, 7-64 group list returning for current process, 3-73 setting, 7-60 gtacl variables, PMSEARCHLIST, 12-27 Guardian environment, using from access function, 1-7 chdir function, 1-19 chmod function, 1-23 chown function, 1-28 chroot function, 1-32 creat function, 1-46 creat64 function, 1-54 execl function, 2-8 execle function, 2-16 execlp function, 2-24 execv function, 2-32 execve function, 2-40 execvp function, 2-48 fch
Index fchown function, 3-8 fstat function, 3-30 fstat64 function, 3-41 fsync function, 3-61 ioctl function, 3-99 kill function, 4-2 lchmod function, 4-7 lchown function, 4-11 link function, 4-16 lstat function, 4-34 lstat64 function, 4-44 mknod function, 4-55 nice function, 5-2 open function, 5-9, 5-21 read function, 6-4, 6-9, 7-359 readlink function, 6-12 readv function, 6-16 rename function, 6-47 rename_oss function, 6-47 select function, 7-10 seteuid function, 7-55 spt_fstat64z function, 7-232 spt_fstatz
OSS System Calls Reference Manual locks, file, 3-11, 7-159, 7-166 login configuration file, 12-53 login.
Index msgrcv function, 4-65 to 4-68 msgsnd function, 4-69 to 4-72 mutex default, 5-143, 5-150 error checking, 5-143, 5-150 fast, 5-148 nonrecursive, 5-148 normal, 5-143, 5-150 recursive, 5-143, 5-148, 5-150 N nice function, 5-2 to 5-3 nonrecursive mutex, 5-148 normal mutex, 5-143, 5-150 null file, 11-29 O obase values, bc utility, 11-15 octal ASCII character set, 12-16 oflag values, open function, 5-7, 5-19 open function, 5-4 to 5-15 open64 function, 5-16 to 5-26 osh variables Guardian PARAMs, 12-23 LOGNA
OSS System Calls Reference Manual initializing a condition variable, 5-82, 5-88 initializing a thread attributes object, 5-51 locking a mutex, 5-156 locking a mutex without waiting, 5-158 obtaining the guardsize attribute, 5-36 obtaining the thread identifier, 5-164 Pathsend file use, 5-258 Pathsend tags, 5-260, 5-294 PUT_ FILE_CLOSE_ function, 5-197 PUT_CANCEL function, 5-188 PUT_CONTROL function, 5-190 PUT_FILE_OPEN_ function, 5-199 PUT_LOCKFILE function, 5-225 PUT_LOCKREC function, 5-228 PUT_READLOCKX fu
Index real user ID, 3-96, 7-66, 7-76 receiving signals, 7-92, 7-415 returning an alternate signal stack, 7-98 returning effective group ID, 3-70 returning effective user ID, 3-71 returning group ID, 3-78, 3-79 returning group list, 3-73 returning OSS process ID, 3-80 returning parent OSS process ID, 3-81 returning real group ID, 3-72 returning scheduling priority, 3-82 returning user ID, 3-71, 3-96 saved-set group ID, 7-59 saved-set user ID, 7-76 sending a signal to, 4-2 setting effective group ID, 7-53, 7-
OSS System Calls Reference Manual function, 5-39 pthread_attr_getschedparam function, 5-41 pthread_attr_getschedpolicy function, 5-43 pthread_attr_getscope function, 5-45 pthread_attr_getstackaddr function, 5-47 pthread_attr_getstacksize function, 5-49 pthread_attr_init function, 5-51 pthread_attr_setdetachstate function, 5-54 pthread_attr_setguardsize function, 5-57 pthread_attr_setguardsize_np function, 5-59 pthread_attr_setinheritsched function, 5-61 pthread_attr_setschedparam function, 5-64 pthread_attr
Index function, 5-180 pthread_testcancel function, 5-182 pthread_unlock_global_np function, 5-184 put_awaitio function, 5-186 PUT_CANCEL function, 5-188 to 5-189 PUT_CONTROL function, 5-190 to 5-192 put_fd_read_ready function, 5-193 put_fd_write_ready function, 5-195 PUT_FILE_CLOSE_ function, 5-197 to 5-198 PUT_FILE_OPEN_ function, 5-199 to 5-211 PUT_FILE_WRITEREAD_ function, 5-212 to 5-214 put_generateTag function, 5-215 put_getTMFConcurrentTransactions function, 5-216 put_INITRECEIVE function, 5-217 put_I
OSS System Calls Reference Manual 4-22, 4-25, 7-290, 7-293 read64_ function, 6-8 to 6-11 readlink function, 6-12 to 6-14 readv function, 6-15 to 6-20 recursive mutex, 5-143, 5-148, 5-150 recv function, 6-21 to 6-23 recv64_ function, 6-24 to 6-26 recvfrom function, 6-27 to 6-30 recvfrom64_ function, 6-31 to 6-33 recvmsg function, 6-34 to 6-38 recvmsg64_ function, 6-39 to 6-42 remote objects, using on fstat function, 3-31 fstat64 function, 3-42 lstat function, 4-35 lstat64 function, 4-45 spt_fstat64z function
Index detaching segment, 2-5, 2-13, 2-21, 2-29, 2-37, 2-45, 7-83, 8-5, 8-20, 8-41, 8-47, 8-64 memory alignment of segments, 7-78 number of segments, 7-78, 7-87 obtaining key for, 7-87 performing control operations on, 7-80 propagating, 7-78, 8-41 returning identifier of, 7-85 sizes of segments, 7-87 swap file for, 7-87 uniqueness of identifiers, 7-87 shell variables CDPATH, 12-18 COMP_ROOT, 12-19 EDITOR, 12-23 EMS_COLLECTOR, 12-23 ENV, 12-23 EXINIT, 12-23 FCEDIT, 12-23 FPATH, 12-23 HISTFILE, 12-23 HISTSIZE,
OSS System Calls Reference Manual sigpending function, 7-102 to 7-103 sigprocmask function, 7-104 to 7-105 sigsuspend function, 7-106 to 7-108 sigwait function, 7-109 sockatmark function, 7-112 to 7-113 socket accepting a connection, 1-2, 7-131 binding a name, 1-14 connecting, 1-37, 7-146 controlling socket communication, 7-69 creating, 7-114 creating a connected pair, 7-119 creating by accepting a connection, 1-2, 7-131 creating endpoints, 7-114 destroying, 1-34, 7-141 disabling send and receive operations
Index spt_fgetcx function, 7-180 to 7-181 spt_fgets function, 7-182 spt_fgetsx function, 7-183 to 7-184 spt_fgetwc function, 7-185 spt_fgetwcx function, 7-186 to 7-187 spt_FileIOHandler_p function, 7-190 SPT_FILE_CLOSE_ function, 7-188 to 7-189 SPT_FILE_OPEN_ function, 7-191 to 7-203 spt_fork function, 7-204 spt_fprintf function, 7-205 spt_fprintfx function, 7-206 to 7-212 spt_fputc function, 7-213 spt_fputcx function, 7-214 to 7-216 spt_fputs function, 7-217 spt_fputsx function, 7-218 to 7-219 spt_fputwc f
OSS System Calls Reference Manual spt_recvfrom function, 7-368 spt_recvfromx function, 7-369 to 7-371 spt_recvmsg function, 7-372 spt_recvmsgx function, 7-373 to 7-376 spt_recvx function, 7-377 to 7-379 spt_regFile function, 7-380 spt_regFileIOHandler function, 7-381 spt_regOSSFileIOHandler function, 7-382 spt_regPathsendFile function, 7-383 spt_regPathsendTagHandler function, 7-384 spt_regTimerHandler function, 7-386 spt_REPLYX function, 7-387 spt_REPLYXL function, 7-388 spt_select function, 7-390 to 7-391
Index 7-175, 7-176, 7-179, 7-182, 7-185, 7-190, 7-205, 7-213, 7-217, 7-220, 7-223, 7-255, 7-259, 7-260, 7-261, 7-266, 7-270, 7-271, 7-272, 7-279, 7-280, 7-281, 7-282, 7-296, 7-298, 7-306, 7-307, 7-314, 7-317, 7-318, 7-319, 7-327, 7-337, 7-363, 7-365, 7-367, 7-368, 7-372, 7-380, 7-381, 7-382, 7-386, 7-387, 7-388, 7-394, 7-395, 7-401, 7-413, 7-417, 7-419, 7-420, 7-426, 7-438, 7-439, 7-442, 7-446, 7-451, 7-452, 7-465, 11-39 attribute object, 5-113 causing a wait, 5-95 creating, 5-101 creating a data key, 5-128
OSS System Calls Reference Manual SPT_READX function, 7-348 spt_recvfromx function, 7-369 spt_recvmsgx function, 7-373 spt_recvx function, 7-377 spt_select function, 7-390 spt_select_single_np function, 7-392 spt_sendmsgx function, 7-396 spt_sendtox function, 7-403 spt_sendx function, 7-407 SPT_SETMODE function, 7-410 spt_system function, 7-425 SPT_UNLOCKFILE function, 7-433 SPT_UNLOCKREC function, 7-435 spt_vfprintfx function, 7-443 spt_vprintfx function, 7-447 spt_waitpid function, 7-449 SPT_WRITEREADX fu
Index utimebuf, 9-11 utsname, 9-5 winsize, 3-99 st_atime, 3-29, 3-40, 4-32, 4-43, 7-231, 7-241, 7-499, 7-510, 12-50 swap file, shared segment, 7-87 symbolic link making, 7-533 names, 12-44 providing information about, 4-28, 4-38 reading from, 6-12 symbolic value AF_INET, 7-114, 7-124, 7-127 AF_INET6, 7-114, 7-124, 7-127 AF_UNIX, 7-114, 7-119, 7-124, 7-127 ARG_MAX, 11-15 BC_BASE_MAX, 11-10 BC_DIM_MAX, 11-10 BC_SCALE_MAX, 11-10 BC_STRING_MAX, 11-10 BRKINT, 11-64 CHARCLASS_NAME_MAX, 11-11 CHAR_BIT, 11-11 CHAR_
OSS System Calls Reference Manual F_UNLCK, 3-14, 7-161, 7-168 GETALL, 7-16 GETNCNT, 7-16, 7-17 GETPID, 7-16, 7-18 GETVAL, 7-16, 7-18 GETZCNT, 7-16, 7-18 HUGE_VAL, 11-19 HUGE_VALF, 11-19 HUGE_VALL, 11-19 HUPCL, 11-66 ICANON, 11-66 ICRNL, 11-64 IEXTEN, 11-67 IGNBRK, 11-64 IGNCR, 11-64 IGNPAR, 11-64 INLCR, 11-64 INPCK, 11-64 INT_BIT, 11-11 INT_MAX, 11-11 INT_MIN, 11-11 IOV_MAX, 11-15 IPC_CREAT, 7-20, 7-85 IPC_EXCL, 7-20, 7-85 IPC_NOWAIT, 7-24 IPC_PRIVATE, 7-20, 7-86 IPC_RMID, 4-59, 7-17, 7-80 IPC_SET, 4-59, 7-
Index MSG_PEEK, 6-21, 6-24, 6-27, 6-31, 6-34, 6-39, 7-369, 7-373, 7-377 MSG_TRUNC, 6-35, 6-40, 7-374 M_1_PI, 11-19 M_2_PI, 11-19 M_2_SQRTPI, 11-19 M_E, 11-18 M_LN10, 11-19 M_LN2, 11-19 M_LOG10E, 11-19 M_LOG2E, 11-19 M_PI, 11-19 M_PI_2, 11-19 M_PI_4, 11-19 M_SQRT1_2, 11-19 M_SQRT2, 11-19 NAME_MAX, 11-16 NL_ARGMAX, 11-12 NL_LANGMAX, 11-16 NL_MSGMAX, 11-12 NL_NMAX, 11-12 NL_SETMAX, 11-12 NL_TEXTMAX, 11-12 NOFLSH, 11-67 OCRNL, 11-65 ONLCR, 11-65 ONLRET, 11-65 ONOCR, 11-65 OPEN_MAX, 11-16 OPOST, 11-65 O_NONBLOCK
OSS System Calls Reference Manual SIOCGIFDSTADDR, 3-98 SIOCGIFFLAGS, 3-98 SIOCGIFNETMASK, 3-98 SIOCGIFNUM, 3-97 SIOCSARP, 3-98 SIOCSIFADDR, 3-98 SIOCSIFBRDADDR, 3-98 SIOCSIFDSTADDR, 3-98 SIOCSIFFLAGS, 3-98 SIOCSIFNETMASK, 3-98 SOCK_DGRAM, 3-91 SOCK_MAXBUF, 11-16 SOCK_STREAM, 3-91 SOL_SOCKET, 3-88, 7-69 SO_ACCEPTCONN, 3-89 SO_BROADCAST, 3-90, 7-71 SO_DEBUG, 3-90, 7-71 SO_DONTROUTE, 3-90, 7-71 SO_ERROR, 3-90 SO_KEEPALIVE, 3-90, 7-72 SO_LINGER, 1-35, 3-90, 7-72 SO_OOBINLINE, 3-90, 7-72 SO_RCVBUF, 3-90, 7-72 SO
Index 7-229, 7-239, 7-497, 7-508 S_IWGRP, 1-22, 3-3, 4-6, 4-54, 7-85 S_IWOTH, 1-22, 3-3, 4-6, 4-54, 7-85 S_IWUSR, 1-22, 3-3, 4-6, 4-54, 7-85 S_IXGRP, 1-22, 3-3, 4-6, 4-54, 7-85 S_IXOTH, 1-22, 3-3, 4-6, 4-54, 7-85 S_IXUSR, 1-22, 3-3, 4-6, 4-54, 7-85 S_NONSTOP, 5-8, 5-20 TCIFLUSH, 11-68 TCIOFF, 11-68 TCIOFLUSH, 11-68 TCION, 11-68 TCOFLUSH, 11-68 TCOOFF, 11-68 TCOON, 11-68 TCSADRAIN, 11-68 TCSAFLUSH, 11-68 TCSANOW, 11-68 TIOCGWINSZ, 3-98 TIOCSWINSZ, 3-99 TOSTOP, 11-67 TZNAME_MAX, 11-12 UCHAR_MAX, 11-12 UINT_MA
OSS System Calls Reference Manual _TPC_BAD_DEBUG_OPTIONS, 12-60 _TPC_BAD_DEFINES, 12-57, 12-60 _TPC_BAD_ENVIRON, 12-57 _TPC_BAD_ENVP, 12-57 _TPC_BAD_ERROR_DETAIL, 12-57 _TPC_BAD_EXTENSION, 12-57, 12-60 _TPC_BAD_EXTSWAP, 12-57, 12-60 _TPC_BAD_FDMAP, 12-57 _TPC_BAD_HOMETERM, 12-57, 12-60 _TPC_BAD_INHERIT, 12-58, 12-60 _TPC_BAD_INTERNAL, 12-58, 12-60 _TPC_BAD_INTERPRETER, 12-61 _TPC_BAD_JOB, 12-61 _TPC_BAD_MEM, 12-61 _TPC_BAD_NAME_OPTIONS, 12-61 _TPC_BAD_OSS_OPTIONS, 12-61 _TPC_BAD_OUTPUT, 12-58, 12-61 _TPC_BA
Index _TPC_SUPPLIED_DEFINES_ONLY, 8-11, 8-26, 8-38, 8-53, 8-70 symlink function, 7-533 to 7-536 system identifying, 9-5 limits, 11-8, 11-10 nodename, 9-5 system time, returning, 3-94 system time-zone, returning, 3-94 T tar file, 11-50 tar file format, 11-48 to 11-50 tdm_execve function, 8-2 to 8-16 tdm_execvep function, 8-17 to 8-31 tdm_fork function, 8-32 to 8-42 tdm_spawn function, 8-43 to 8-59 tdm_spawnp function, 8-60 to 8-76 termcap file, 11-51 to 11-63 terminal capability database, 11-51 terminal dri
OSS System Calls Reference Manual W wait function, 10-2 to 10-6 waitpid function, 10-7 to 10-13 word getting from input stream, 7-186, 7-273, 7-275 writing out, 7-324 to 7-326 write function, 10-14 to 10-19 write64_ function, 10-20 to 10-24 writev function, 10-25 to 10-30 writing out a string, 7-218 a word, 7-324 to 7-326 characters, 7-214, 7-308 wide characters, 7-221, 7-320, 7-322 writing out a string, 7-315 writing out characters, 7-311 Index−36 Hewlett-Packard Company 527186-023