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