Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / OS_NS_sys_wait.h
blob4d14145cc408dbd3636b127c27b61087d9cee133
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file OS_NS_sys_wait.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
8 * @author Jesper S. M|ller<stophph@diku.dk>
9 * @author and a cast of thousands...
11 //=============================================================================
13 #ifndef ACE_OS_NS_SYS_WAIT_H
14 # define ACE_OS_NS_SYS_WAIT_H
16 # include /**/ "ace/pre.h"
18 # include "ace/config-all.h"
20 # if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 # endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/os_include/sys/os_wait.h"
25 #include /**/ "ace/ACE_export.h"
27 #if defined (ACE_EXPORT_MACRO)
28 # undef ACE_EXPORT_MACRO
29 #endif
30 #define ACE_EXPORT_MACRO ACE_Export
32 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
34 namespace ACE_OS
36 /// Calls OS @c ::wait function, so it's only portable to UNIX/POSIX
37 /// platforms.
38 ACE_NAMESPACE_INLINE_FUNCTION
39 pid_t wait (int * = 0);
41 /**
42 * Calls @c ::WaitForSingleObject on Win32 and ACE::waitpid ()
43 * otherwise. Returns the passed in @a pid_t on success and -1 on
44 * failure.
45 * On Win32, @a pid is ignored if the @a handle is not equal to 0.
46 * Passing the process @a handle is prefer on Win32 because using
47 * @a pid to wait on the project doesn't always work correctly
48 * if the waited process has already terminated.
50 ACE_NAMESPACE_INLINE_FUNCTION
51 pid_t wait (pid_t pid,
52 ACE_exitcode *status,
53 int wait_options = 0,
54 ACE_HANDLE handle = 0);
56 /**
57 * Calls @c ::waitpid on UNIX/POSIX platforms Does not work on VxWorks 5.5.x.
58 * On Win32, @a pid is ignored if the @a handle is not equal to 0.
59 * Passing the process @a handle is prefer on Win32 because using
60 * @a pid to wait on the project doesn't always work correctly
61 * if the waited process has already terminated.
63 ACE_NAMESPACE_INLINE_FUNCTION
64 pid_t waitpid (pid_t pid,
65 ACE_exitcode *status = 0,
66 int wait_options = 0,
67 ACE_HANDLE handle = 0);
68 } /* namespace ACE_OS */
70 ACE_END_VERSIONED_NAMESPACE_DECL
72 # if defined (ACE_HAS_INLINED_OSCALLS)
73 # if defined (ACE_INLINE)
74 # undef ACE_INLINE
75 # endif /* ACE_INLINE */
76 # define ACE_INLINE inline
77 # include "ace/OS_NS_sys_wait.inl"
78 # endif /* ACE_HAS_INLINED_OSCALLS */
80 # include /**/ "ace/post.h"
81 #endif /* ACE_OS_NS_SYS_WAIT_H */