1.1 --- a/epoc32/include/libc/sys/wait.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/libc/sys/wait.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,67 @@
1.4 -wait.h
1.5 +/*
1.6 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +/**
1.28 + @file
1.29 + @publishedAll
1.30 + @released
1.31 +*/
1.32 +
1.33 +#ifndef _SYS_WAIT_H
1.34 +#define _SYS_WAIT_H
1.35 +
1.36 +#ifdef __cplusplus
1.37 +extern "C" {
1.38 +#endif
1.39 +#include <_ansi.h>
1.40 +#include <sys/types.h>
1.41 +
1.42 +#define WNOHANG 1
1.43 +#define WUNTRACED 2
1.44 +
1.45 +/**
1.46 +A status looks like:
1.47 + <2 bytes info> <2 bytes code>
1.48 +
1.49 + <code> == 0, child has exited, info is the exit value
1.50 + <code> == 1..7e, child has exited, info is the signal number.
1.51 + <code> == 7f, child has stopped, info was the signal number.
1.52 + <code> == 80, there was a core dump.
1.53 + <code/>
1.54 +*/
1.55 +#define WIFEXITED(w) (((w) & 0xff) == 0)
1.56 +#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f))
1.57 +#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
1.58 +#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
1.59 +#define WTERMSIG(w) ((w) & 0x7f)
1.60 +#define WSTOPSIG WEXITSTATUS
1.61 +#define WAIT_ANY (-1)
1.62 +
1.63 +IMPORT_C pid_t wait (int* status);
1.64 +IMPORT_C pid_t waitpid (pid_t pid, int* status, int options);
1.65 +
1.66 +
1.67 +#ifdef __cplusplus
1.68 +}
1.69 +#endif
1.70 +
1.71 +#endif