blob: 236eb17b00e929ee2ee25dada2b198d0fd3d1471 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>rpm: Signal Queue API.</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">rpm <span id="projectnumber">4.9.1</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Signal Queue API.</div> </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct rpmsig_s * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#ga025c38c60444b94fa0857c3ff09b3969">rpmsig</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct rpmsqElem * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#gac748f0100af09213cb3355f6342c9eb4">rpmsq</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#ga52bb06d05310c4c81d40747c03eb2d94">rpmsqAction_t</a> )(int signum)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default signal handler prototype. <a href="#ga52bb06d05310c4c81d40747c03eb2d94"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#ga07972540d07ec41922891e8dbdc8e823">rpmsqIsCaught</a> (int signum)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Test if given signal has been caught (while signals blocked). <a href="#ga07972540d07ec41922891e8dbdc8e823"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#gafad9681ab319c8bd68d8b622128caffc">rpmsqAction</a> (int signum)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default signal handler. <a href="#gafad9681ab319c8bd68d8b622128caffc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#gad9549ed43cbb708e506288cb1e33d009">rpmsqEnable</a> (int signum, <a class="el" href="group__rpmsq.html#ga52bb06d05310c4c81d40747c03eb2d94">rpmsqAction_t</a> handler)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enable or disable a signal handler. <a href="#gad9549ed43cbb708e506288cb1e33d009"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#gab13d7b8025bdd175c80fea8ea9f066fb">rpmsqFork</a> (<a class="el" href="group__rpmsq.html#gac748f0100af09213cb3355f6342c9eb4">rpmsq</a> sq)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fork a child process. <a href="#gab13d7b8025bdd175c80fea8ea9f066fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsq.html#gabe449b3b92e2c98d46fb4bbc6cefc58e">rpmsqWait</a> (<a class="el" href="group__rpmsq.html#gac748f0100af09213cb3355f6342c9eb4">rpmsq</a> sq)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for child process to be reaped. <a href="#gabe449b3b92e2c98d46fb4bbc6cefc58e"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga025c38c60444b94fa0857c3ff09b3969"></a><!-- doxytag: member="rpmsq.h::rpmsig" ref="ga025c38c60444b94fa0857c3ff09b3969" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct rpmsig_s* <a class="el" href="group__rpmsq.html#ga025c38c60444b94fa0857c3ff09b3969">rpmsig</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="rpmsq_8h_source.html#l00021">21</a> of file <a class="el" href="rpmsq_8h_source.html">rpmsq.h</a>.</p>
</div>
</div>
<a class="anchor" id="gac748f0100af09213cb3355f6342c9eb4"></a><!-- doxytag: member="rpmsq.h::rpmsq" ref="gac748f0100af09213cb3355f6342c9eb4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct rpmsqElem* <a class="el" href="group__rpmsq.html#gac748f0100af09213cb3355f6342c9eb4">rpmsq</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="rpmsq_8h_source.html#l00025">25</a> of file <a class="el" href="rpmsq_8h_source.html">rpmsq.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga52bb06d05310c4c81d40747c03eb2d94"></a><!-- doxytag: member="rpmsq.h::rpmsqAction_t" ref="ga52bb06d05310c4c81d40747c03eb2d94" args=")(int signum)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* <a class="el" href="group__rpmsq.html#ga52bb06d05310c4c81d40747c03eb2d94">rpmsqAction_t</a>)(int signum)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default signal handler prototype. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">signum</td><td>signal number </td></tr>
<tr><td class="paramname">info</td><td>(siginfo_t) signal info </td></tr>
<tr><td class="paramname">context</td><td>signal context </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="rpmsq_8h_source.html#l00036">36</a> of file <a class="el" href="rpmsq_8h_source.html">rpmsq.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gafad9681ab319c8bd68d8b622128caffc"></a><!-- doxytag: member="rpmsq.h::rpmsqAction" ref="gafad9681ab319c8bd68d8b622128caffc" args="(int signum)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void rpmsqAction </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>signum</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default signal handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">signum</td><td>signal number </td></tr>
<tr><td class="paramname">info</td><td>(siginfo_t) signal info </td></tr>
<tr><td class="paramname">context</td><td>signal context </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gad9549ed43cbb708e506288cb1e33d009"></a><!-- doxytag: member="rpmsq.h::rpmsqEnable" ref="gad9549ed43cbb708e506288cb1e33d009" args="(int signum, rpmsqAction_t handler)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int rpmsqEnable </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>signum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__rpmsq.html#ga52bb06d05310c4c81d40747c03eb2d94">rpmsqAction_t</a> </td>
<td class="paramname"><em>handler</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable or disable a signal handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">signum</td><td>signal to enable (or disable if negative) </td></tr>
<tr><td class="paramname">handler</td><td>sa_sigaction handler (or NULL to use rpmsqHandler()) </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>no. of refs, -1 on error </dd></dl>
</div>
</div>
<a class="anchor" id="gab13d7b8025bdd175c80fea8ea9f066fb"></a><!-- doxytag: member="rpmsq.h::rpmsqFork" ref="gab13d7b8025bdd175c80fea8ea9f066fb" args="(rpmsq sq)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pid_t rpmsqFork </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__rpmsq.html#gac748f0100af09213cb3355f6342c9eb4">rpmsq</a> </td>
<td class="paramname"><em>sq</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fork a child process. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">sq</td><td>scriptlet queue element </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>fork(2) pid </dd></dl>
</div>
</div>
<a class="anchor" id="ga07972540d07ec41922891e8dbdc8e823"></a><!-- doxytag: member="rpmsq.h::rpmsqIsCaught" ref="ga07972540d07ec41922891e8dbdc8e823" args="(int signum)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int rpmsqIsCaught </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>signum</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Test if given signal has been caught (while signals blocked). </p>
<p>Similar to sigismember() but operates on internal signal queue. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">signum</td><td>signal to test for </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if caught, 0 if not and -1 on error </dd></dl>
</div>
</div>
<a class="anchor" id="gabe449b3b92e2c98d46fb4bbc6cefc58e"></a><!-- doxytag: member="rpmsq.h::rpmsqWait" ref="gabe449b3b92e2c98d46fb4bbc6cefc58e" args="(rpmsq sq)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pid_t rpmsqWait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__rpmsq.html#gac748f0100af09213cb3355f6342c9eb4">rpmsq</a> </td>
<td class="paramname"><em>sq</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Wait for child process to be reaped. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">sq</td><td>scriptlet queue element </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>reaped child pid </dd></dl>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jul 15 2011 for rpm by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
|