epoc32/include/libc/sys/wait.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* 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
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
/**
williamr@2
    24
 @file
williamr@2
    25
 @publishedAll
williamr@2
    26
 @released
williamr@2
    27
*/
williamr@2
    28
williamr@2
    29
#ifndef _SYS_WAIT_H
williamr@2
    30
#define _SYS_WAIT_H
williamr@2
    31
williamr@2
    32
#ifdef __cplusplus
williamr@2
    33
extern "C" {
williamr@2
    34
#endif
williamr@2
    35
#include <_ansi.h>
williamr@2
    36
#include <sys/types.h>
williamr@2
    37
williamr@2
    38
#define WNOHANG 1
williamr@2
    39
#define WUNTRACED 2
williamr@2
    40
williamr@2
    41
/**
williamr@2
    42
A status looks like:
williamr@2
    43
      <2 bytes info> <2 bytes code>
williamr@2
    44
williamr@2
    45
      <code> == 0, child has exited, info is the exit value
williamr@2
    46
      <code> == 1..7e, child has exited, info is the signal number.
williamr@2
    47
      <code> == 7f, child has stopped, info was the signal number.
williamr@2
    48
      <code> == 80, there was a core dump.
williamr@2
    49
      <code/>
williamr@2
    50
*/
williamr@2
    51
#define WIFEXITED(w)	(((w) & 0xff) == 0)
williamr@2
    52
#define WIFSIGNALED(w)	(((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f))
williamr@2
    53
#define WIFSTOPPED(w)	(((w) & 0xff) == 0x7f)
williamr@2
    54
#define WEXITSTATUS(w)	(((w) >> 8) & 0xff)
williamr@2
    55
#define WTERMSIG(w)	((w) & 0x7f)
williamr@2
    56
#define WSTOPSIG	WEXITSTATUS
williamr@2
    57
#define WAIT_ANY	(-1)
williamr@2
    58
williamr@2
    59
IMPORT_C pid_t wait (int* status);
williamr@2
    60
IMPORT_C pid_t waitpid (pid_t pid, int* status, int options);
williamr@2
    61
williamr@2
    62
williamr@2
    63
#ifdef __cplusplus
williamr@2
    64
}
williamr@2
    65
#endif
williamr@2
    66
williamr@2
    67
#endif