223 lines
5.9 KiB
HTML
223 lines
5.9 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>Qp0zEndTerminal()--End a Generic Terminal</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 -->
|
||
|
<!-- UNIX11 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2DCIJB at -->
|
||
|
<!-- RCHVMW2 on 1 Jun 1999 at 16:14:12 -->
|
||
|
<!-- 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>
|
||
|
|
||
|
<a name="Top_Of_Page"></a>
|
||
|
|
||
|
<h2>Qp0zEndTerminal()--End a Generic Terminal</h2>
|
||
|
|
||
|
<div class="box" style="width: 70%;">
|
||
|
<br>
|
||
|
Syntax
|
||
|
|
||
|
<pre>
|
||
|
#include <qp0ztrml.h>
|
||
|
|
||
|
int Qp0zEndTerminal( Qp0z_Terminal_T <em>handle</em>, ... );
|
||
|
</pre>
|
||
|
|
||
|
Service Program Name: QP0ZTRML<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE <br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <strong>Qp0zEndTerminal()</strong> function ends the terminal session
|
||
|
specified by <em>handle</em>.</p>
|
||
|
|
||
|
<p>The terminal session is ended by:</p>
|
||
|
|
||
|
<ol>
|
||
|
<li>Ending the terminal window. <br>
|
||
|
</li>
|
||
|
|
||
|
<li>Sending the SIGHUP signal to the process group of the interpreter process.
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>Closing the pipes connected to the interpreter process.</li>
|
||
|
</ol>
|
||
|
|
||
|
<p><strong>Qp0zEndTerminal()</strong> waits for the interpreter process to end
|
||
|
before returning to the caller. The status information about how the
|
||
|
interpreter process ended is returned in the optional second parameter.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong><em>handle</em></strong></dt>
|
||
|
|
||
|
<dd>(Input) Handle for terminal. <br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong><em>...</em></strong></dt>
|
||
|
|
||
|
<dd>(Output) An optional pointer to an integer to store the status information
|
||
|
about how the interpreter process ended. See the <a href="wait.htm">wait()</a>
|
||
|
API for information on interpreting the status information. The status
|
||
|
information is only returned when the Return_Exit_Status field is set in the
|
||
|
Qp0z_Terminal_Attr_T parameter when the terminal is started by <a href=
|
||
|
"startrml.htm">Qp0zStartTerminal()</a>.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<p>None.</p>
|
||
|
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<dl compact>
|
||
|
<dt><em>0</em></dt>
|
||
|
|
||
|
<dd><strong>Qp0zEndTerminal()</strong> was successful.</dd>
|
||
|
|
||
|
<dt><em>value</em></dt>
|
||
|
|
||
|
<dd><strong>Qp0zEndTerminal()</strong> was not successful. The value returned
|
||
|
is an errno indicating the failure.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Error Conditions</h3>
|
||
|
|
||
|
<p>If <strong>Qp0zEndTerminal()</strong> is not successful, the return value
|
||
|
usually indicates one of the following errors. Under some conditions, the
|
||
|
return value could indicate an error other than those listed here.</p>
|
||
|
|
||
|
<dl compact>
|
||
|
<dt><em>[EFAULT]</em></dt>
|
||
|
|
||
|
<dd><p>The address used for an argument is not correct.</p>
|
||
|
|
||
|
<p>In attempting to use an argument in a call, the system detected an address
|
||
|
that is not valid.</p>
|
||
|
|
||
|
<p>While attempting to access a parameter passed to this function, the system
|
||
|
detected an address that is not valid.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[EINVAL]</em></dt>
|
||
|
|
||
|
<dd>The value specified for the argument is not correct.
|
||
|
|
||
|
<p>A function was passed incorrect argument values, or an operation was attempted
|
||
|
on an object and the operation specified is not supported for that type of
|
||
|
object.</p>
|
||
|
|
||
|
<p>An argument value is not valid, out of range, or NULL.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[EIO]</em></dt>
|
||
|
|
||
|
<dd><p>Input/output error.</p>
|
||
|
|
||
|
<p>A physical I/O error occurred.</p>
|
||
|
|
||
|
<p>A referenced object may be damaged.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[EUNKNOWN]</em></dt>
|
||
|
|
||
|
<dd><p>Unknown system state.</p>
|
||
|
|
||
|
<p>The operation failed because of an unknown system state. See any messages in
|
||
|
the job log and correct any errors that are indicated, then retry the
|
||
|
operation.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Usage Notes</h3>
|
||
|
|
||
|
<ol>
|
||
|
<li>The default action for the SIGHUP signal is to end the request. The program
|
||
|
running in the interpreter process can use a signal handler to catch the signal
|
||
|
and perform any necessary cleanup. See <a href="unix5a1.htm">Signals APIs</a>
|
||
|
for more information about signals.</li>
|
||
|
</ol>
|
||
|
|
||
|
<br>
|
||
|
<h3>Related Information</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li>The <<strong>qp0ztrml.h</strong>> file (see <a href="unix13.htm">
|
||
|
Header Files for UNIX-Type Functions</a>)<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="cntltrml.htm">Qp0zControlTerminal()</a>--Control a Generic
|
||
|
Terminal<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="gettrmlp.htm">Qp0zGetTerminalPid()</a>--Get Process ID for a Generic
|
||
|
Terminal<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="isatrml.htm">Qp0zIsATerminal()</a>--Determine Whether Descriptor Is
|
||
|
Connected to a Generic Terminal<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="runtrml.htm">Qp0zRunTerminal()</a>--Run a Generic Terminal<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="settrmlm.htm">Qp0zSetTerminalMode()</a>--Set Modes for a Generic
|
||
|
Terminal<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="startrml.htm">Qp0zStartTerminal()</a>--Start a Generic
|
||
|
Terminal<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="wait.htm">wait()</a>--Wait for Child Process to End<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<hr>
|
||
|
API introduced: V4R2
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"gentrml.htm">Generic Terminal APIs</a> | <a href="aplist.htm">APIs by
|
||
|
category</a></td>
|
||
|
</tr>
|
||
|
</table></center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|