YARP
Yet Another Robot Platform
PlatformUnistd.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_RUN_IMPL_PLATFORMUNISTD_H
7 #define YARP_RUN_IMPL_PLATFORMUNISTD_H
8 
10 
11 namespace yarp {
12 namespace run {
13 namespace impl {
14 
15 #if defined(YARP_HAS_ACE)
16  using ACE_OS::fork;
17  using ACE_OS::pipe;
18  using ACE_OS::dup;
19  using ACE_OS::dup2;
20  using ACE_OS::execvp;
21 
22  // ACE version of execl/execlp/execle are just fake implementation, see
23  // https://github.com/DOCGroup/ACE_TAO/issues/409
24  // https://github.com/DOCGroup/ACE_TAO/blob/ACE%2BTAO-6_4_3/ACE/ace/OS_NS_unistd.cpp#L227
25  // (last ACE version tested: 6.4.3).
26  // This is not a big issue since (at the moment) it is used only in
27  // #if !defined(_WIN32) branches, but we might need to fix this at some
28  // point.
29  using ::execlp;
30 #else
32  using ::pipe;
33  using ::dup;
34  using ::dup2;
35  using ::execlp;
36  using ::execvp;
37 #endif
38 
39 } // namespace impl
40 } // namespace os
41 } // namespace yarp
42 
43 
44 #endif // YARP_RUN_IMPL_PLATFORMUNISTD_H
int fork()
Portable wrapper for the fork() function.
Definition: Os.cpp:159
The main, catch-all namespace for YARP.
Definition: dirs.h:16