69 lines
2.6 KiB
HTML
69 lines
2.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>Initial thread is special, cannot pthread_exit()</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. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!--File Edited November 2001 -->
|
||
|
<!--End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Initial thread is special, cannot pthread_exit()</h2>
|
||
|
|
||
|
<p>The initial thread in an i5/OS process is special because of these
|
||
|
characteristics:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>If the initial thread calls <strong>pthread_exit()</strong>, the process
|
||
|
terminates.</li>
|
||
|
|
||
|
<li>If the initial thread is the target of a <strong>pthread_cancel()</strong>
|
||
|
request that is acted upon, the process terminates.</li>
|
||
|
|
||
|
<li>If the initial thread terminates through any other action, the process
|
||
|
terminates.</li>
|
||
|
|
||
|
<li>Many i5/OS APIs and commands target jobs. Some of those APIs target
|
||
|
resources that are allocated to threads for retrieval or modification. If this
|
||
|
is the case, the resources that displayed, modified, or retrieved may be the
|
||
|
resources owned by the initial thread.
|
||
|
|
||
|
<p>For example, the CL command <strong>WRKACTJOB</strong> allows you to display
|
||
|
information such as the call stack for a job. Since a job does not have a call
|
||
|
stack and the call stack is thread scoped, the call stack of the initial thread
|
||
|
is displayed when you choose to display the call stack of a job.</p>
|
||
|
|
||
|
<p>Other APIs or CL commands that operate against jobs have undergone similar
|
||
|
changes. See the specific documentation for the API or CL command of
|
||
|
concern.</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center">
|
||
|
<a href="rzah4mst.htm">Pthread APIs</a> |
|
||
|
<a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|