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