equal
deleted
inserted
replaced
1 wait.h |
1 /* |
|
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @publishedAll |
|
26 @released |
|
27 */ |
|
28 |
|
29 #ifndef _SYS_WAIT_H |
|
30 #define _SYS_WAIT_H |
|
31 |
|
32 #ifdef __cplusplus |
|
33 extern "C" { |
|
34 #endif |
|
35 #include <_ansi.h> |
|
36 #include <sys/types.h> |
|
37 |
|
38 #define WNOHANG 1 |
|
39 #define WUNTRACED 2 |
|
40 |
|
41 /** |
|
42 A status looks like: |
|
43 <2 bytes info> <2 bytes code> |
|
44 |
|
45 <code> == 0, child has exited, info is the exit value |
|
46 <code> == 1..7e, child has exited, info is the signal number. |
|
47 <code> == 7f, child has stopped, info was the signal number. |
|
48 <code> == 80, there was a core dump. |
|
49 <code/> |
|
50 */ |
|
51 #define WIFEXITED(w) (((w) & 0xff) == 0) |
|
52 #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f)) |
|
53 #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) |
|
54 #define WEXITSTATUS(w) (((w) >> 8) & 0xff) |
|
55 #define WTERMSIG(w) ((w) & 0x7f) |
|
56 #define WSTOPSIG WEXITSTATUS |
|
57 #define WAIT_ANY (-1) |
|
58 |
|
59 IMPORT_C pid_t wait (int* status); |
|
60 IMPORT_C pid_t waitpid (pid_t pid, int* status, int options); |
|
61 |
|
62 |
|
63 #ifdef __cplusplus |
|
64 } |
|
65 #endif |
|
66 |
|
67 #endif |