146 lines
3.6 KiB
HTML
146 lines
3.6 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>Qp0wGetPid()--Get Process ID</title>
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- UNIX11 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2DCIJB at -->
|
||
|
<!-- RCHVMW2 on 1 Jun 1999 at 16:14:12 -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!-- This file has undergone html cleanup July 2002 by JET -->
|
||
|
<!-- Edited by Kersten Feb 02 -->
|
||
|
<!--End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<a name="Top_Of_Page"></a>
|
||
|
<!-- Java sync-link -->
|
||
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
||
|
</script>
|
||
|
|
||
|
<h2>Qp0wGetPid()--Get Process ID</h2>
|
||
|
|
||
|
<div class="box" style="width: 50%;">
|
||
|
<br>
|
||
|
Syntax<br>
|
||
|
<pre>
|
||
|
#include <sys/types.h>
|
||
|
#include <qp0wpid.h>
|
||
|
|
||
|
pid_t Qp0wGetPid(void);
|
||
|
</pre>
|
||
|
|
||
|
<br>
|
||
|
Service Program Name: QP0WSRV1<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <strong>Qp0wGetPid()</strong> function returns the process ID of the
|
||
|
calling process.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<p>None.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<p>None.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="10 90" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>pid_t</em></td>
|
||
|
<td align="left" valign="top">The value returned by <strong>
|
||
|
Qp0wGetPid()</strong> is the process ID of the calling process.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
<h3>Error Conditions</h3>
|
||
|
|
||
|
<p>The <strong>Qp0wGetPid()</strong> function is always successful and does not
|
||
|
return an error.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Usage Notes</h3>
|
||
|
|
||
|
<ol>
|
||
|
<li>The <strong>Qp0wGetPid()</strong> function provides an i5/OS-specific way
|
||
|
to obtain the process ID of the calling process. It performs the same function
|
||
|
as <strong>getpid()</strong>.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><strong>Qp0wGetPid()</strong> enables a process for signals if the process
|
||
|
is not already enabled for signals. For details, see (see <a href=
|
||
|
"sigesig.htm">Qp0sEnableSignals()--Enable Process for Signals</a>.</li>
|
||
|
</ol>
|
||
|
|
||
|
<br>
|
||
|
<h3>Related Information</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li>The <<strong>sys/types.h</strong>> file (see <a href="unix13.htm">
|
||
|
Header Files for UNIX-Type Functions</a>)<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>The <<strong>qp0wpid.h</strong>> file (see <a href="unix13.htm">
|
||
|
Header Files for UNIX-Type Functions</a>)<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="getpid.htm">getpid()</a>--Get Process ID<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="sigdsig.htm">Qp0sDisableSignals()</a>--Disable Process for
|
||
|
Signals<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="sigesig.htm">Qp0sEnableSignals()</a>--Enable Process for
|
||
|
Signals<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="qgpidni.htm">Qp0wGetPidNoInit()</a>--Get Process ID without
|
||
|
Initializing for Signals</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<hr>
|
||
|
API introduced: V3R6
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|