Open System Services System Calls Reference Manual (G06.28+, H06.05+)
spt_waitpid(2) OSS System Calls Reference Manual
NAME
spt_waitpid - Initiates thread-aware waitpid( ) function
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
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.
In spthreadh., a mapping of waitpid( ) to spt_waitpid() has been defined:
#define waitpid(pid, stat_loc, options) \
spt_waitpid(pid, stat_loc, options)
For C applications that do not use the nonblocking feature, this mapping is available only when
the correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE
#include <spthread.h>
For C applications that use the nonblocking feature, this mapping is available only when the
correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE_NONBLOCK
#include <spthread.h>
For C++ applications that do not use the nonblocking feature, this mapping is available only
when the correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE_PRAGMA
#include <spthread.h>
For C++ applications that use the nonblocking feature, this mapping is available only when the
correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE_PRAGMA_NONBLOCK
#include <spthread.h>
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].
7−344 Hewlett-Packard Company 527186-007