os_wait.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_wait.h
00006  *
00007  *  declarations for waiting
00008  *
00009  *  os_wait.h,v 1.8 2006/01/12 10:08:45 jwillemsen Exp
00010  *
00011  *  @author Don Hinton <dhinton@dresystems.com>
00012  *  @author This code was originally in various places including ace/OS.h.
00013  */
00014 //=============================================================================
00015 
00016 #ifndef ACE_OS_INCLUDE_SYS_OS_WAIT_H
00017 #define ACE_OS_INCLUDE_SYS_OS_WAIT_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "ace/config-lite.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/os_include/os_signal.h"
00028 #include "ace/os_include/sys/os_resource.h"
00029 
00030 #if !defined (ACE_LACKS_SYS_WAIT_H)
00031 #  include /**/ <sys/wait.h>
00032 #endif /* !ACE_LACKS_SYS_WAIT_H */
00033 
00034 // Place all additions (especially function declarations) within extern "C" {}
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif /* __cplusplus */
00039 
00040   // Wrapping around wait status <wstat> macros for platforms that
00041   // lack them.
00042 
00043 # if !defined (WCOREDUMP)
00044 #   define WCOREDUMP(stat) 0
00045 # endif /* WCOREDUMP */
00046 
00047 # if !defined (WNOHANG)
00048 #   define WNOHANG 0100
00049 # endif /* !WNOHANG */
00050 
00051   // If the value of WIFEXITED(stat) is non-zero, this macro evaluates
00052   // to the exit code that the child process exit(3C), or the value
00053   // that the child process returned from main.  Peaceful exit code is
00054   // 0.
00055 # if !defined (WEXITSTATUS)
00056 #   define WEXITSTATUS(stat) stat
00057 # endif /* WEXITSTATUS */
00058 
00059 # if !defined (WIFCONTINUED)
00060 #   define WIFCONTINUED(stat) 0
00061 # endif /* WIFCONTINUED */
00062 
00063   // Evaluates to a non-zero value if status was returned for a child
00064   // process that terminated normally.  0 means status wasn't
00065   // returned.
00066 # if !defined (WIFEXITED)
00067 #   define WIFEXITED(stat) 1
00068 # endif /* WIFEXITED */
00069 
00070   // Evaluates to a non-zero value if status was returned for a child
00071   // process that terminated due to the receipt of a signal.  0 means
00072   // status wasnt returned.
00073 # if !defined (WIFSIGNALED)
00074 #   define WIFSIGNALED(stat) 0
00075 # endif /* WIFSIGNALED */
00076 
00077 # if !defined (WIFSTOPPED)
00078 #   define WIFSTOPPED(stat) 0
00079 # endif /* WIFSTOPPED */
00080 
00081 # if !defined (WSTOPSIG)
00082 #   define WSTOPSIG(stat) 0
00083 # endif /* WSTOPSIG */
00084 
00085   // If the value of  WIFSIGNALED(stat)  is non-zero,  this macro
00086   // evaluates to the number of the signal that  caused  the
00087   // termination of the child process.
00088 # if !defined (WTERMSIG)
00089 #   define WTERMSIG(stat) 0
00090 # endif /* WTERMSIG */
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif /* __cplusplus */
00095 
00096 #include /**/ "ace/post.h"
00097 #endif /* ACE_OS_INCLUDE_SYS_OS_WAIT_H */

Generated on Thu Nov 9 09:41:58 2006 for ACE by doxygen 1.3.6