1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINCSYS/WAIT.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,64 @@
1.4 +/*
1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#ifndef _SYS_WAIT_H
1.30 +#define _SYS_WAIT_H
1.31 +
1.32 +#ifdef __cplusplus
1.33 +extern "C" {
1.34 +#endif
1.35 +#include <_ansi.h>
1.36 +#include <sys/types.h>
1.37 +
1.38 +#define WNOHANG 1
1.39 +#define WUNTRACED 2
1.40 +
1.41 +/**
1.42 +A status looks like:
1.43 + <2 bytes info> <2 bytes code>
1.44 +
1.45 + <code> == 0, child has exited, info is the exit value
1.46 + <code> == 1..7e, child has exited, info is the signal number.
1.47 + <code> == 7f, child has stopped, info was the signal number.
1.48 + <code> == 80, there was a core dump.
1.49 + <code/>
1.50 +*/
1.51 +#define WIFEXITED(w) (((w) & 0xff) == 0)
1.52 +#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f))
1.53 +#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
1.54 +#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
1.55 +#define WTERMSIG(w) ((w) & 0x7f)
1.56 +#define WSTOPSIG WEXITSTATUS
1.57 +#define WAIT_ANY (-1)
1.58 +
1.59 +IMPORT_C pid_t wait (int* status);
1.60 +IMPORT_C pid_t waitpid (pid_t pid, int* status, int options);
1.61 +
1.62 +
1.63 +#ifdef __cplusplus
1.64 +}
1.65 +#endif
1.66 +
1.67 +#endif