Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# OS_NS_sys_wait.h File Reference

`#include "ace/config-all.h"`
`#include "ace/os_include/sys/os_wait.h"`
`#include "ace/ACE_export.h"`
`#include "ace/OS_NS_sys_wait.inl"`

Include dependency graph for OS_NS_sys_wait.h:

This graph shows which files directly or indirectly include this file:

## Namespaces
namespace | ACE_OS
## Defines
#define | ACE_EXPORT_MACRO ACE_Export
#define | ACE_INLINE inline
## Functions
ACE_NAMESPACE_INLINE_FUNCTION pid_t | wait (int *=0)
ACE_NAMESPACE_INLINE_FUNCTION pid_t | wait (pid_t pid, ACE_exitcode *status, int wait_options=0, ACE_HANDLE handle=0)
ACE_NAMESPACE_INLINE_FUNCTION pid_t | waitpid (pid_t pid, ACE_exitcode *status=0, int wait_options=0, ACE_HANDLE handle=0)

## Detailed Description

Id
  OS_NS_sys_wait.h,v 1.5 2006/01/27 10:36:04 jwillemsen Exp

Author:
  Douglas C. Schmidt <schmidt@cs.wustl.edu>

  Jesper S. M|ller<stophph@diku.dk>

  and a cast of thousands...

Originally in OS.h.

## Define Documentation

#define ACE_EXPORT_MACRO ACE_Export

#define ACE_INLINE inline

## Function Documentation

ACE_INLINE pid_t ACE_OS::wait | ( | pid_t | pid,
|  | ACE_exitcode * | status,
|  | int | wait_options = `0`,
|  | ACE_HANDLE | handle = `0`
| ) |

| Calls `::WaitForSingleObject` on Win32 and ACE::waitpid () otherwise. Returns the passed in pid_t on success and -1 on failure. On Win32, pid is ignored if the handle is not equal to 0. Passing the process handle is prefer on Win32 because using pid to wait on the project doesn't always work correctly if the waited process has already terminated.

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE pid_t ACE_OS::wait | ( | int * | = `0` | ) |

| Calls OS `wait` function, so it's only portable to UNIX/POSIX platforms.

ACE_INLINE pid_t ACE_OS::waitpid | ( | pid_t | pid,
|  | ACE_exitcode * | status = `0`,
|  | int | wait_options = `0`,
|  | ACE_HANDLE | handle = `0`
| ) |

| Calls `waitpid` on UNIX/POSIX platforms and `::await` on Chorus. Does not work on Vxworks 5.5.x, or pSoS. On Win32, pid is ignored if the handle is not equal to 0. Passing the process handle is prefer on Win32 because using pid to wait on the project doesn't always work correctly if the waited process has already terminated.