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

  1. 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().

  2. 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



API introduced: V3R6

[ Back to top | UNIX-Type APIs | APIs by category ]