epoc32/include/libc/sys/wait.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 
    20 /**
    21  @file
    22  @publishedAll
    23  @released
    24 */
    25 
    26 #ifndef _SYS_WAIT_H
    27 #define _SYS_WAIT_H
    28 
    29 #ifdef __cplusplus
    30 extern "C" {
    31 #endif
    32 #include <_ansi.h>
    33 #include <sys/types.h>
    34 
    35 #define WNOHANG 1
    36 #define WUNTRACED 2
    37 
    38 /**
    39 A status looks like:
    40       <2 bytes info> <2 bytes code>
    41 
    42       <code> == 0, child has exited, info is the exit value
    43       <code> == 1..7e, child has exited, info is the signal number.
    44       <code> == 7f, child has stopped, info was the signal number.
    45       <code> == 80, there was a core dump.
    46       <code/>
    47 */
    48 #define WIFEXITED(w)	(((w) & 0xff) == 0)
    49 #define WIFSIGNALED(w)	(((w) & 0x7f) > 0 && ((w) & 0x7f< 0x7f))
    50 #define WIFSTOPPED(w)	(((w) & 0xff) == 0x7f)
    51 #define WEXITSTATUS(w)	(((w) >> 8) & 0xff)
    52 #define WTERMSIG(w)	((w) & 0x7f)
    53 #define WSTOPSIG	WEXITSTATUS
    54 #define WAIT_ANY	(-1)
    55 
    56 IMPORT_C pid_t wait (int* status);
    57 IMPORT_C pid_t waitpid (pid_t pid, int* status, int options);
    58 
    59 
    60 #ifdef __cplusplus
    61 }
    62 #endif
    63 
    64 #endif