2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
33 #include <sys/types.h>
40 <2 bytes info> <2 bytes code>
42 <code> == 0, child has exited, info is the exit value
43 <code> == 1..7e, child has exited, info is the signal number.
44 <code> == 7f, child has stopped, info was the signal number.
45 <code> == 80, there was a core dump.
48 #define WIFEXITED(w) (((w) & 0xff) == 0)
49 #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f))
50 #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
51 #define WEXITSTATUS(w) (((w) >> 8) & 0xff)
52 #define WTERMSIG(w) ((w) & 0x7f)
53 #define WSTOPSIG WEXITSTATUS
56 IMPORT_C pid_t wait (int* status);
57 IMPORT_C pid_t waitpid (pid_t pid, int* status, int options);