source: rtems/doc/posix_users/process.t @ 0a535af

4.104.114.84.95
Last change on this file since 0a535af was 0a535af, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 28, 2002 at 7:14:44 PM

2001-06-28 Joel Sherrill <joel@…>

  • preface.texi, procenv.t, process.t, signal.t, stamp-vti, version.texi: Updated as part of starting a sweep on the POSIX User's Guide.
  • Property mode set to 100644
File size: 7.0 KB
Line 
1@c
2@c COPYRIGHT (c) 1988-2002.
3@c On-Line Applications Research Corporation (OAR).
4@c All rights reserved.
5@c
6@c $Id$
7@c
8
9@chapter Process Creation and Execution Manager
10
11@section Introduction
12
13The process creation and execution manager provides the
14functionality associated with the creation and termination
15of processes. 
16
17
18The directives provided by the process creation and execution manager are:
19
20@itemize @bullet
21@item @code{fork} - Create a Process
22@item @code{execl} - Execute a File
23@item @code{execv} - Execute a File
24@item @code{execle} - Execute a File
25@item @code{execve} - Execute a File
26@item @code{execlp} - Execute a File
27@item @code{execvp} - Execute a File
28@item @code{pthread_atfork} - Register Fork Handlers
29@item @code{wait} - Wait for Process Termination
30@item @code{waitpid} - Wait for Process Termination
31@item @code{_exit} - Terminate a Process
32@end itemize
33
34@section Background
35
36POSIX process functionality can not be completely
37supported by RTEMS.  This is because RTEMS provides no memory
38protection and implements a @i{single process, multi-threaded
39execution model}.  In this light, RTEMS provides none of the
40routines that are associated with the creation of new processes.
41However, since the entire RTEMS application (e.g. executable)
42is logically a single POSIX process, RTEMS is able to provide
43implementations of many operations on processes.  The rule of
44thumb is that those routines provide a meaningful result.
45For example, @code{getpid()} returns the node number.
46
47@section Operations
48
49The only functionality method defined by this manager which is
50supported by RTEMS is the @code{_exit} service.  The
51implementation of @code{_exit} shuts the application down and
52is equivalent to invoking either @code{exit} or
53@code{rtems_shutdown_executive}.
54
55@section Directives
56
57This section details the process creation and execution manager's directives.
58A subsection is dedicated to each of this manager's directives
59and describes the calling sequence, related constants, usage,
60and status codes.
61
62@c
63@c
64@c
65@page
66@subsection fork - Create a Process
67
68@findex fork
69@cindex  create a process
70
71@subheading CALLING SEQUENCE:
72
73@ifset is-C
74@example
75#include <sys/types.h>
76
77int fork( void );
78@end example
79@end ifset
80
81@ifset is-Ada
82@end ifset
83
84@subheading STATUS CODES:
85
86@table @b
87@item ENOSYS
88This routine is not supported by RTEMS.
89
90@end table
91
92@subheading DESCRIPTION:
93
94This routine is not supported by RTEMS.
95
96@subheading NOTES:
97
98NONE
99
100@c
101@c
102@c
103@page
104@subsection execl - Execute a File
105
106@findex execl
107@cindex  execute a file
108
109@subheading CALLING SEQUENCE:
110
111@ifset is-C
112@example
113int execl(
114  const char *path,
115  const char *arg,
116  ...
117);
118@end example
119@end ifset
120
121@ifset is-Ada
122@end ifset
123
124@subheading STATUS CODES:
125
126@table @b
127@item ENOSYS
128This routine is not supported by RTEMS.
129
130@end table
131
132@subheading DESCRIPTION:
133
134This routine is not supported by RTEMS.
135
136@subheading NOTES:
137
138NONE
139
140@c
141@c
142@c
143@page
144@subsection execv - Execute a File
145
146@findex execv
147@cindex  execute a file
148
149@subheading CALLING SEQUENCE:
150
151@ifset is-C
152@example
153int execv(
154  const char *path,
155  char const *argv[],
156  ...
157);
158@end example
159@end ifset
160
161@ifset is-Ada
162@end ifset
163
164@subheading STATUS CODES:
165
166@table @b
167@item ENOSYS
168This routine is not supported by RTEMS.
169
170@end table
171
172@subheading DESCRIPTION:
173
174This routine is not supported by RTEMS.
175
176@subheading NOTES:
177
178NONE
179
180@c
181@c
182@c
183@page
184@subsection execle - Execute a File
185
186@findex execle
187@cindex  execute a file
188
189@subheading CALLING SEQUENCE:
190
191@ifset is-C
192@example
193int execle(
194  const char *path,
195  const char *arg,
196  ...
197);
198@end example
199@end ifset
200
201@ifset is-Ada
202@end ifset
203
204@subheading STATUS CODES:
205
206@table @b
207@item ENOSYS
208This routine is not supported by RTEMS.
209
210@end table
211
212@subheading DESCRIPTION:
213
214This routine is not supported by RTEMS.
215
216@subheading NOTES:
217
218NONE
219
220@c
221@c
222@c
223@page
224@subsection execve - Execute a File
225
226@findex execve
227@cindex  execute a file
228
229@subheading CALLING SEQUENCE:
230
231@ifset is-C
232@example
233int execve(
234  const char *path,
235  char *const argv[],
236  char *const envp[]
237);
238@end example
239@end ifset
240
241@ifset is-Ada
242@end ifset
243
244@subheading STATUS CODES:
245
246@table @b
247@item ENOSYS
248This routine is not supported by RTEMS.
249
250@end table
251
252@subheading DESCRIPTION:
253
254This routine is not supported by RTEMS.
255
256@subheading NOTES:
257
258NONE
259
260@c
261@c
262@c
263@page
264@subsection execlp - Execute a File
265
266@findex execlp
267@cindex  execute a file
268
269@subheading CALLING SEQUENCE:
270
271@ifset is-C
272@example
273int execlp(
274  const char *file,
275  const char *arg,
276  ...
277);
278@end example
279@end ifset
280
281@ifset is-Ada
282@end ifset
283
284@subheading STATUS CODES:
285
286@table @b
287@item ENOSYS
288This routine is not supported by RTEMS.
289
290@end table
291
292@subheading DESCRIPTION:
293
294This routine is not supported by RTEMS.
295
296@subheading NOTES:
297
298NONE
299
300@c
301@c
302@c
303@page
304@subsection execvp - Execute a File
305
306@findex execvp
307@cindex  execute a file
308
309@subheading CALLING SEQUENCE:
310
311@ifset is-C
312@example
313int execvp(
314  const char *file,
315  char *const argv[]
316  ...
317);
318@end example
319@end ifset
320
321@ifset is-Ada
322@end ifset
323
324@subheading STATUS CODES:
325
326@table @b
327@item ENOSYS
328This routine is not supported by RTEMS.
329
330@end table
331
332@subheading DESCRIPTION:
333
334This routine is not supported by RTEMS.
335
336@subheading NOTES:
337
338NONE
339
340@c
341@c
342@c
343@page
344@subsection pthread_atfork - Register Fork Handlers
345
346@findex pthread_atfork
347@cindex  register fork handlers
348
349@subheading CALLING SEQUENCE:
350
351@ifset is-C
352@example
353#include <sys/types.h>
354
355int pthread_atfork(
356  void (*prepare)(void),
357  void (*parent)(void),
358  void (*child)(void)
359);
360@end example
361@end ifset
362
363@ifset is-Ada
364@end ifset
365
366@subheading STATUS CODES:
367
368@table @b
369@item ENOSYS
370This routine is not supported by RTEMS.
371
372@end table
373
374@subheading DESCRIPTION:
375
376This routine is not supported by RTEMS.
377
378@subheading NOTES:
379
380NONE
381
382@c
383@c
384@c
385@page
386@subsection wait - Wait for Process Termination
387
388@findex wait
389@cindex  wait for process termination
390
391@subheading CALLING SEQUENCE:
392
393@ifset is-C
394@example
395#include <sys/types.h>
396#include <sys/wait.h>
397
398int wait(
399  int *stat_loc
400);
401@end example
402@end ifset
403
404@ifset is-Ada
405@end ifset
406
407@subheading STATUS CODES:
408
409@table @b
410@item ENOSYS
411This routine is not supported by RTEMS.
412
413@end table
414
415@subheading DESCRIPTION:
416
417This routine is not supported by RTEMS.
418
419@subheading NOTES:
420
421NONE
422
423@c
424@c
425@c
426@page
427@subsection waitpid - Wait for Process Termination
428
429@findex waitpid
430@cindex  wait for process termination
431
432@subheading CALLING SEQUENCE:
433
434@ifset is-C
435@example
436int wait(
437  pid_t  pid,
438  int   *stat_loc,
439  int    options
440);
441@end example
442@end ifset
443
444@ifset is-Ada
445@end ifset
446
447@subheading STATUS CODES:
448
449@table @b
450@item ENOSYS
451This routine is not supported by RTEMS.
452
453@end table
454
455@subheading DESCRIPTION:
456
457This routine is not supported by RTEMS.
458
459@subheading NOTES:
460
461NONE
462
463@c
464@c
465@c
466@page
467@subsection _exit - Terminate a Process
468
469@findex _exit
470@cindex  terminate a process
471
472@subheading CALLING SEQUENCE:
473
474@ifset is-C
475@example
476void _exit(
477  int status
478);
479@end example
480@end ifset
481
482@ifset is-Ada
483@end ifset
484
485@subheading STATUS CODES:
486
487NONE
488
489@subheading DESCRIPTION:
490
491The @code{_exit()} function terminates the calling process.
492
493@subheading NOTES:
494
495In RTEMS, a process is equivalent to the entire application on a single
496processor. Invoking this service terminates the application.
Note: See TracBrowser for help on using the repository browser.