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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
|
#if 0
// $Id$
// Process_Manager.cpp
#define ACE_BUILD_DLL
#include "ace/Process_Manager.h"
#if !defined (__ACE_INLINE__)
#include "ace/Process_Manager.i"
#endif /* __ACE_INLINE__ */
ACE_ALLOC_HOOK_DEFINE(ACE_Process_Control)
ACE_ALLOC_HOOK_DEFINE(ACE_Process_Manager)
void
ACE_Process_Manager::dump (void) const
{
ACE_TRACE ("ACE_Process_Manager::dump");
}
ACE_Process_Descriptor::ACE_Process_Descriptor (void)
{
ACE_TRACE ("ACE_Process_Descriptor::ACE_Process_Descriptor");
}
int
ACE_Process_Manager::resize (size_t size)
{
ACE_TRACE ("ACE_Process_Manager::resize");
return -1;
}
// Create and initialize the table to keep track of the process pool.
int
ACE_Process_Manager::open (size_t size)
{
ACE_TRACE ("ACE_Process_Manager::open");
return -1;
}
// Initialize the synchronization variables.
ACE_Process_Manager::ACE_Process_Manager (size_t size)
{
ACE_TRACE ("ACE_Process_Manager::ACE_Process_Manager");
}
// Close up and release all resources.
int
ACE_Process_Manager::close (void)
{
ACE_TRACE ("ACE_Process_Manager::close");
return -1;
}
ACE_Process_Manager::~ACE_Process_Manager (void)
{
ACE_TRACE ("ACE_Process_Manager::~ACE_Process_Manager");
this->close ();
}
// Call the appropriate OS routine to spawn a process. Should *not*
// be called with the lock_ held...
int
ACE_Process_Manager::spawn_i (ACE_THR_FUNC func,
void *args,
long flags,
pid_t *t_id,
u_int priority,
void *stack,
size_t stack_size)
{
ACE_TRACE ("ACE_Process_Manager::spawn_i");
return -1;
}
// Create a new process running FUNC. *Must* be called with the lock_
// held...
int
ACE_Process_Manager::spawn (ACE_THR_FUNC func,
void *args,
long flags,
pid_t *t_id,
u_int priority,
void *stack,
size_t stack_size)
{
ACE_TRACE ("ACE_Process_Manager::spawn");
return -1;
}
// Create N new processs running FUNC.
int
ACE_Process_Manager::spawn_n (int n,
ACE_THR_FUNC func,
void *args,
long flags,
u_int priority)
{
ACE_TRACE ("ACE_Process_Manager::spawn_n");
return -1;
}
// Append a process into the pool (does not check for duplicates).
// Must be called with locks held.
int
ACE_Process_Manager::append_proc (pid_t t_id,
ACE_Process_Descriptor::Process_State proc_state)
{
ACE_TRACE ("ACE_Process_Manager::append_proc");
return -1;
}
// Insert a process into the pool (checks for duplicates and doesn't
// allow them to be inserted twice).
int
ACE_Process_Manager::insert_proc (pid_t t_id)
{
ACE_TRACE ("ACE_Process_Manager::insert_proc");
return -1;
}
// Remove a process from the pool. Must be called with locks held.
void
ACE_Process_Manager::remove_proc (int i)
{
ACE_TRACE ("ACE_Process_Manager::remove_proc");
}
int
ACE_Process_Manager::resume_proc (int i)
{
ACE_TRACE ("ACE_Process_Manager::resume_proc");
return -1;
}
int
ACE_Process_Manager::suspend_proc (int i)
{
ACE_TRACE ("ACE_Process_Manager::suspend_proc");
return -1;
}
int
ACE_Process_Manager::kill_proc (int i, int signum)
{
ACE_TRACE ("ACE_Process_Manager::kill_proc");
return -1;
}
// Locate the index in the table associated with <t_id>. Must be
// called with the lock held.
int
ACE_Process_Manager::find (pid_t t_id)
{
ACE_TRACE ("ACE_Process_Manager::find");
return -1;
}
// Suspend a single process.
int
ACE_Process_Manager::suspend (pid_t t_id)
{
ACE_TRACE ("ACE_Process_Manager::suspend");
return -1;
}
// Resume a single process.
int
ACE_Process_Manager::resume (pid_t t_id)
{
ACE_TRACE ("ACE_Process_Manager::resume");
return -1;
}
// Kill a single process.
int
ACE_Process_Manager::kill (pid_t t_id, int signum)
{
ACE_TRACE ("ACE_Process_Manager::kill");
return -1;
}
// Get group ids for a particular process id.
int
ACE_Process_Manager::get_grp (pid_t t_id, int &grp_id)
{
ACE_TRACE ("ACE_Process_Manager::get_grp");
return -1;
}
// Set group ids for a particular process id.
int
ACE_Process_Manager::set_grp (pid_t t_id, int grp_id)
{
ACE_TRACE ("ACE_Process_Manager::set_grp");
return -1;
}
// Suspend a group of processs.
int
ACE_Process_Manager::apply_grp (int grp_id,
PROC_FUNC func,
int arg)
{
ACE_TRACE ("ACE_Process_Manager::apply_grp");
return -1;
}
int
ACE_Process_Manager::suspend_grp (int grp_id)
{
ACE_TRACE ("ACE_Process_Manager::suspend_grp");
return -1;
}
// Resume a group of processs.
int
ACE_Process_Manager::resume_grp (int grp_id)
{
ACE_TRACE ("ACE_Process_Manager::resume_grp");
return -1;
}
// Kill a group of processs.
int
ACE_Process_Manager::kill_grp (int grp_id, int signum)
{
ACE_TRACE ("ACE_Process_Manager::kill_grp");
return -1;
}
int
ACE_Process_Manager::apply_all (PROC_FUNC func, int arg)
{
ACE_TRACE ("ACE_Process_Manager::apply_all");
return -1;
}
// Resume all processs that are suspended.
int
ACE_Process_Manager::resume_all (void)
{
ACE_TRACE ("ACE_Process_Manager::resume_all");
return -1;
}
int
ACE_Process_Manager::suspend_all (void)
{
ACE_TRACE ("ACE_Process_Manager::suspend_all");
return -1;
}
int
ACE_Process_Manager::kill_all (int sig)
{
ACE_TRACE ("ACE_Process_Manager::kill_all");
return -1;
}
// Must be called when process goes out of scope to clean up its table
// slot.
void *
ACE_Process_Manager::exit (void *status)
{
ACE_TRACE ("ACE_Process_Manager::exit");
return 0;
}
// Wait for all the processs to exit.
int
ACE_Process_Manager::wait (ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_Process_Manager::wait");
return -1;
}
void
ACE_Process_Control::dump (void) const
{
ACE_TRACE ("ACE_Process_Control::dump");
}
// Initialize the process controller.
ACE_Process_Control::ACE_Process_Control (ACE_Process_Manager *t,
int insert)
{
ACE_TRACE ("ACE_Process_Control::ACE_Process_Control");
}
// Automatically kill process on exit.
ACE_Process_Control::~ACE_Process_Control (void)
{
ACE_TRACE ("ACE_Process_Control::~ACE_Process_Control");
}
// Exit from process (but clean up first).
void *
ACE_Process_Control::exit (void *exit_status)
{
ACE_TRACE ("ACE_Process_Control::exit");
return 0;
}
#endif
|