Qp0wGetPid()--Get Process ID
Syntax
#include <sys/types.h> #include <qp0wpid.h> pid_t Qp0wGetPid(void);
Service Program Name: QP0WSRV1
Default Public Authority: *USE
Threadsafe: Yes
The Qp0wGetPid() function returns the process ID of the calling process.
Parameters
None.
Authorities
None.
Return Value
pid_t | The value returned by Qp0wGetPid() is the process ID of the calling process. |
Error Conditions
The Qp0wGetPid() function is always successful and does not return an error.
Usage Notes
- The Qp0wGetPid() function provides an IBM® i-specific way
to obtain the process ID of the calling process. It performs the same function
as getpid().
- Qp0wGetPid() enables a process for signals if the process is not already enabled for signals. For details, see (see Qp0sEnableSignals()--Enable Process for Signals.
Related Information
- The <sys/types.h> file (see
Header Files for UNIX®-Type Functions)
- The <qp0wpid.h> file (see
Header Files for UNIX-Type Functions)
- getpid()--Get Process ID
- Qp0sDisableSignals()--Disable Process for
Signals
- Qp0sEnableSignals()--Enable Process for
Signals
- Qp0wGetPidNoInit()--Get Process ID without Initializing for Signals
API introduced: V3R6