ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/qp2signalpase.htm

171 lines
4.7 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>Qp2SignalPase()--Post an i5/OS PASE Signal</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 -->
<!-- Edited by Kersten Jan 02 -->
<!-- Created by V2DCIJB on 23 Nov 1999 -->
<!--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>Qp2SignalPase()--Post an i5/OS PASE Signal</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Syntax
<pre>
#include &lt;qp2user.h&gt;
int Qp2SignalPase(int signo);
</pre>
<br>
&nbsp;&nbsp;Service Program Name: QP2USER<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Qp2SignalPase() function posts an i5/OS Portable Application Solutions
Environment (i5/OS PASE) signal to an i5/OS PASE program that is already
running in the job.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>signo</strong></dt>
<dd>(Input) Signal number to post. A positive value is an ILE signal number,
which causes the system to post a corresponding i5/OS PASE signal. ILE and
i5/OS PASE signals correspond if they have the same name (for example,
SIGTERM) in a system-provided header file. A negative value is the negation of
an i5/OS PASE (and AIX) signal number.</dd>
</dl>
<br>
<h3>Authorities</h3>
<p>None.</p>
<br>
<h3>Return Value</h3>
<p>The function result is an integer that indicates whether the i5/OS PASE
signal was posted successfully. Header file qp2user.h defines the following
constants for the return code from Qp2SignalPase:</p>
<table cellpadding="5">
<!-- cols="35 65" -->
<tr>
<td align="left" valign="top"><em>QP2CALLPASE_NORMAL(0)</em> </td>
<td align="left" valign="top">An i5/OS PASE signal was posted
successfully.<br><br></td>
</tr>
<tr>
<td align="left" valign="top" nowrap><em>QP2CALLPASE_ENVIRON_ERROR(2)</em>
</td>
<td align="left" valign="top">The operation is not allowed because no i5/OS
PASE program is running in the job, or the thread that called Qp2CallPase was
neither the initial i5/OS PASE thread nor a thread created using i5/OS PASE
pthread interfaces.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>QP2CALLPASE_ARG_ERROR(4)</em> </td>
<td align="left" valign="top">The signo parameter value is invalid.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>QP2CALLPASE_TERMINATING(6)</em> </td>
<td align="left" valign="top">The i5/OS PASE program is terminating. No
function result was returned. The i5/OS PASE program may have run the exit
function, or a signal might have caused the program to terminate.</td>
</tr>
</table>
<br>
<h3>Usage Notes</h3>
<ol>
<li>Qp2SignalPase is supported only when an i5/OS PASE program is currently
running in the job. This means that Qp2RunPase must be actively called in the
job, or the job must be a fork child process.<br>
<br>
</li>
<li>Not all ILE signals have an i5/OS PASE equivalent and Qp2SignalPase never
converts ILE SIGCHLD to a corresponding PASE signal. This special handling for
SIGCHLD avoids duplicate PASE signals for the termination of a single child
process (because the system may send both ILE and i5/OS PASE signals to the
parent of any fork child process that ends).<br>
<br>
</li>
<li>If there is only one i5/OS PASE thread running in the job, the signal
remains pending until control is transferred to the i5/OS PASE program. If
other i5/OS PASE threads are running at the time Qp2SignalPase is called, the
system may chose one of the other threads to deliver the signal.</li>
</ol>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="qp2callpase.htm">Qp2RunPase()--Call an i5/OS PASE
Procedure</a><br>
<br>
</li>
<li><a href="qp2runpase.htm">Qp2RunPase()--Run an i5/OS PASE Program</a></li>
</ul>
<br>
<hr>
API introduced: V4R5
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"pase1.htm">i5/OS PASE APIs</a> | <a href="aplist.htm">APIs by category</a>
</td>
</tr>
</table>
</center>
</body>
</html>