williamr@2: /* williamr@2: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef _SYS_WAIT_H williamr@2: #define _SYS_WAIT_H williamr@2: williamr@2: #ifdef __cplusplus williamr@2: extern "C" { williamr@2: #endif williamr@2: #include <_ansi.h> williamr@2: #include williamr@2: williamr@2: #define WNOHANG 1 williamr@2: #define WUNTRACED 2 williamr@2: williamr@2: /** williamr@2: A status looks like: williamr@2: <2 bytes info> <2 bytes code> williamr@2: williamr@2: == 0, child has exited, info is the exit value williamr@2: == 1..7e, child has exited, info is the signal number. williamr@2: == 7f, child has stopped, info was the signal number. williamr@2: == 80, there was a core dump. williamr@2: williamr@2: */ williamr@2: #define WIFEXITED(w) (((w) & 0xff) == 0) williamr@2: #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f)) williamr@2: #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) williamr@2: #define WEXITSTATUS(w) (((w) >> 8) & 0xff) williamr@2: #define WTERMSIG(w) ((w) & 0x7f) williamr@2: #define WSTOPSIG WEXITSTATUS williamr@2: #define WAIT_ANY (-1) williamr@2: williamr@2: IMPORT_C pid_t wait (int* status); williamr@2: IMPORT_C pid_t waitpid (pid_t pid, int* status, int options); williamr@2: williamr@2: williamr@2: #ifdef __cplusplus williamr@2: } williamr@2: #endif williamr@2: williamr@2: #endif