1 //===-- ConnectionFileDescriptorPosix.cpp -----------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #if defined(__APPLE__)
11 // Enable this special support for Apple builds where we can have unlimited
12 // select bounds. We tried switching to poll() and kqueue and we were panicing
13 // the kernel, so we have to stick with select for now.
14 #define _DARWIN_UNLIMITED_SELECT
17 #include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"
18 #include "lldb/Host/Config.h"
19 #include "lldb/Host/IOObject.h"
20 #include "lldb/Host/SocketAddress.h"
21 #include "lldb/Host/Socket.h"
22 #include "lldb/Host/StringConvert.h"
29 #include <sys/types.h>
31 #ifndef LLDB_DISABLE_POSIX
36 // Other libraries and framework includes
37 #include "llvm/Support/ErrorHandling.h"
38 #if defined(__APPLE__)
39 #include "llvm/ADT/SmallVector.h"
42 #include "lldb/lldb-private-log.h"
43 #include "lldb/Core/Communication.h"
44 #include "lldb/Core/Log.h"
45 #include "lldb/Core/StreamString.h"
46 #include "lldb/Core/Timer.h"
47 #include "lldb/Host/Host.h"
48 #include "lldb/Host/Socket.h"
49 #include "lldb/Interpreter/Args.h"
52 using namespace lldb_private;
54 ConnectionFileDescriptor::ConnectionFileDescriptor(bool child_processes_inherit)
57 , m_mutex(Mutex::eMutexTypeRecursive)
58 , m_shutting_down(false)
59 , m_waiting_for_accept(false)
60 , m_child_processes_inherit(child_processes_inherit)
62 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
64 log->Printf("%p ConnectionFileDescriptor::ConnectionFileDescriptor ()", static_cast<void *>(this));
67 ConnectionFileDescriptor::ConnectionFileDescriptor(int fd, bool owns_fd)
70 , m_mutex(Mutex::eMutexTypeRecursive)
71 , m_shutting_down(false)
72 , m_waiting_for_accept(false)
73 , m_child_processes_inherit(false)
75 m_write_sp.reset(new File(fd, owns_fd));
76 m_read_sp.reset(new File(fd, false));
78 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
80 log->Printf("%p ConnectionFileDescriptor::ConnectionFileDescriptor (fd = %i, owns_fd = %i)", static_cast<void *>(this), fd,
85 ConnectionFileDescriptor::~ConnectionFileDescriptor()
87 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
89 log->Printf("%p ConnectionFileDescriptor::~ConnectionFileDescriptor ()", static_cast<void *>(this));
95 ConnectionFileDescriptor::OpenCommandPipe()
99 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
100 // Make the command file descriptor here:
101 Error result = m_pipe.CreateNew(m_child_processes_inherit);
102 if (!result.Success())
105 log->Printf("%p ConnectionFileDescriptor::OpenCommandPipe () - could not make pipe: %s", static_cast<void *>(this),
111 log->Printf("%p ConnectionFileDescriptor::OpenCommandPipe() - success readfd=%d writefd=%d", static_cast<void *>(this),
112 m_pipe.GetReadFileDescriptor(), m_pipe.GetWriteFileDescriptor());
117 ConnectionFileDescriptor::CloseCommandPipe()
119 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
121 log->Printf("%p ConnectionFileDescriptor::CloseCommandPipe()", static_cast<void *>(this));
127 ConnectionFileDescriptor::IsConnected() const
129 return (m_read_sp && m_read_sp->IsValid()) || (m_write_sp && m_write_sp->IsValid());
133 ConnectionFileDescriptor::Connect(const char *s, Error *error_ptr)
135 Mutex::Locker locker(m_mutex);
136 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
138 log->Printf("%p ConnectionFileDescriptor::Connect (url = '%s')", static_cast<void *>(this), s);
144 if (strstr(s, "listen://") == s)
146 // listen://HOST:PORT
147 return SocketListenAndAccept(s + strlen("listen://"), error_ptr);
149 else if (strstr(s, "accept://") == s)
152 return NamedSocketAccept(s + strlen("accept://"), error_ptr);
154 else if (strstr(s, "unix-accept://") == s)
157 return NamedSocketAccept(s + strlen("unix-accept://"), error_ptr);
159 else if (strstr(s, "connect://") == s)
161 return ConnectTCP(s + strlen("connect://"), error_ptr);
163 else if (strstr(s, "tcp-connect://") == s)
165 return ConnectTCP(s + strlen("tcp-connect://"), error_ptr);
167 else if (strstr(s, "udp://") == s)
169 return ConnectUDP(s + strlen("udp://"), error_ptr);
171 #ifndef LLDB_DISABLE_POSIX
172 else if (strstr(s, "fd://") == s)
174 // Just passing a native file descriptor within this current process
175 // that is already opened (possibly from a service or other source).
176 s += strlen("fd://");
177 bool success = false;
178 int fd = StringConvert::ToSInt32(s, -1, 0, &success);
182 // We have what looks to be a valid file descriptor, but we
183 // should make sure it is. We currently are doing this by trying to
184 // get the flags from the file descriptor and making sure it
187 int flags = ::fcntl(fd, F_GETFL, 0);
188 if (flags == -1 || errno == EBADF)
191 error_ptr->SetErrorStringWithFormat("stale file descriptor: %s", s);
194 return eConnectionStatusError;
198 // Don't take ownership of a file descriptor that gets passed
199 // to us since someone else opened the file descriptor and
201 // TODO: Since are using a URL to open connection we should
202 // eventually parse options using the web standard where we
203 // have "fd://123?opt1=value;opt2=value" and we can have an
204 // option be "owns=1" or "owns=0" or something like this to
205 // allow us to specify this. For now, we assume we must
206 // assume we don't own it.
208 std::unique_ptr<Socket> tcp_socket;
209 tcp_socket.reset(new Socket(fd, Socket::ProtocolTcp, false));
210 // Try and get a socket option from this file descriptor to
211 // see if this is a socket and set m_is_socket accordingly.
213 bool is_socket = !!tcp_socket->GetOption(SOL_SOCKET, SO_REUSEADDR, resuse);
216 m_read_sp = std::move(tcp_socket);
217 m_write_sp = m_read_sp;
221 m_read_sp.reset(new File(fd, false));
222 m_write_sp.reset(new File(fd, false));
225 return eConnectionStatusSuccess;
230 error_ptr->SetErrorStringWithFormat("invalid file descriptor: \"fd://%s\"", s);
233 return eConnectionStatusError;
235 else if (strstr(s, "file://") == s)
238 const char *path = s + strlen("file://");
242 fd = ::open(path, O_RDWR);
243 } while (fd == -1 && errno == EINTR);
248 error_ptr->SetErrorToErrno();
249 return eConnectionStatusError;
254 // Set up serial terminal emulation
255 struct termios options;
256 ::tcgetattr(fd, &options);
258 // Set port speed to maximum
259 ::cfsetospeed(&options, B115200);
260 ::cfsetispeed(&options, B115200);
262 // Raw input, disable echo and signals
263 options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
265 // Make sure only one character is needed to return from a read
266 options.c_cc[VMIN] = 1;
267 options.c_cc[VTIME] = 0;
269 ::tcsetattr(fd, TCSANOW, &options);
272 int flags = ::fcntl(fd, F_GETFL, 0);
275 if ((flags & O_NONBLOCK) == 0)
278 ::fcntl(fd, F_SETFL, flags);
281 m_read_sp.reset(new File(fd, true));
282 m_write_sp.reset(new File(fd, false));
283 return eConnectionStatusSuccess;
287 error_ptr->SetErrorStringWithFormat("unsupported connection URL: '%s'", s);
288 return eConnectionStatusError;
291 error_ptr->SetErrorString("invalid connect arguments");
292 return eConnectionStatusError;
296 ConnectionFileDescriptor::InterruptRead()
298 size_t bytes_written = 0;
299 Error result = m_pipe.Write("i", 1, bytes_written);
300 return result.Success();
304 ConnectionFileDescriptor::Disconnect(Error *error_ptr)
306 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
308 log->Printf("%p ConnectionFileDescriptor::Disconnect ()", static_cast<void *>(this));
310 ConnectionStatus status = eConnectionStatusSuccess;
315 log->Printf("%p ConnectionFileDescriptor::Disconnect(): Nothing to disconnect", static_cast<void *>(this));
316 return eConnectionStatusSuccess;
319 if (m_read_sp && m_read_sp->IsValid() && m_read_sp->GetFdType() == IOObject::eFDTypeSocket)
320 static_cast<Socket &>(*m_read_sp).PreDisconnect();
322 // Try to get the ConnectionFileDescriptor's mutex. If we fail, that is quite likely
323 // because somebody is doing a blocking read on our file descriptor. If that's the case,
324 // then send the "q" char to the command file channel so the read will wake up and the connection
325 // will then know to shut down.
327 m_shutting_down = true;
329 Mutex::Locker locker;
330 bool got_lock = locker.TryLock(m_mutex);
334 if (m_pipe.CanWrite())
336 size_t bytes_written = 0;
337 Error result = m_pipe.Write("q", 1, bytes_written);
339 log->Printf("%p ConnectionFileDescriptor::Disconnect(): Couldn't get the lock, sent 'q' to %d, error = '%s'.",
340 static_cast<void *>(this), m_pipe.GetWriteFileDescriptor(), result.AsCString());
344 log->Printf("%p ConnectionFileDescriptor::Disconnect(): Couldn't get the lock, but no command pipe is available.",
345 static_cast<void *>(this));
347 locker.Lock(m_mutex);
350 Error error = m_read_sp->Close();
351 Error error2 = m_write_sp->Close();
352 if (error.Fail() || error2.Fail())
353 status = eConnectionStatusError;
355 *error_ptr = error.Fail() ? error : error2;
358 m_shutting_down = false;
363 ConnectionFileDescriptor::Read(void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status, Error *error_ptr)
365 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
367 Mutex::Locker locker;
368 bool got_lock = locker.TryLock(m_mutex);
372 log->Printf("%p ConnectionFileDescriptor::Read () failed to get the connection lock.", static_cast<void *>(this));
374 error_ptr->SetErrorString("failed to get the connection lock for read.");
376 status = eConnectionStatusTimedOut;
379 else if (m_shutting_down)
380 return eConnectionStatusError;
382 status = BytesAvailable(timeout_usec, error_ptr);
383 if (status != eConnectionStatusSuccess)
387 size_t bytes_read = dst_len;
388 error = m_read_sp->Read(dst, bytes_read);
392 log->Printf("%p ConnectionFileDescriptor::Read() fd = %" PRIu64 ", dst = %p, dst_len = %" PRIu64 ") => %" PRIu64 ", error = %s",
393 static_cast<void *>(this), static_cast<uint64_t>(m_read_sp->GetWaitableHandle()), static_cast<void *>(dst),
394 static_cast<uint64_t>(dst_len), static_cast<uint64_t>(bytes_read), error.AsCString());
399 error.Clear(); // End-of-file. Do not automatically close; pass along for the end-of-file handlers.
400 status = eConnectionStatusEndOfFile;
408 uint32_t error_value = error.GetError();
411 case EAGAIN: // The file was marked for non-blocking I/O, and no data were ready to be read.
412 if (m_read_sp->GetFdType() == IOObject::eFDTypeSocket)
413 status = eConnectionStatusTimedOut;
415 status = eConnectionStatusSuccess;
418 case EFAULT: // Buf points outside the allocated address space.
419 case EINTR: // A read from a slow device was interrupted before any data arrived by the delivery of a signal.
420 case EINVAL: // The pointer associated with fildes was negative.
421 case EIO: // An I/O error occurred while reading from the file system.
422 // The process group is orphaned.
423 // The file is a regular file, nbyte is greater than 0,
424 // the starting position is before the end-of-file, and
425 // the starting position is greater than or equal to the
426 // offset maximum established for the open file
427 // descriptor associated with fildes.
428 case EISDIR: // An attempt is made to read a directory.
429 case ENOBUFS: // An attempt to allocate a memory buffer fails.
430 case ENOMEM: // Insufficient memory is available.
431 status = eConnectionStatusError;
432 break; // Break to close....
434 case ENOENT: // no such file or directory
435 case EBADF: // fildes is not a valid file or socket descriptor open for reading.
436 case ENXIO: // An action is requested of a device that does not exist..
437 // A requested action cannot be performed by the device.
438 case ECONNRESET: // The connection is closed by the peer during a read attempt on a socket.
439 case ENOTCONN: // A read is attempted on an unconnected socket.
440 status = eConnectionStatusLostConnection;
441 break; // Break to close....
443 case ETIMEDOUT: // A transmission timeout occurs during a read attempt on a socket.
444 status = eConnectionStatusTimedOut;
449 log->Printf("%p ConnectionFileDescriptor::Read (), unexpected error: %s", static_cast<void *>(this),
450 strerror(error_value));
451 status = eConnectionStatusError;
452 break; // Break to close....
461 ConnectionFileDescriptor::Write(const void *src, size_t src_len, ConnectionStatus &status, Error *error_ptr)
463 Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
465 log->Printf("%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64 ")", static_cast<void *>(this),
466 static_cast<const void *>(src), static_cast<uint64_t>(src_len));
471 error_ptr->SetErrorString("not connected");
472 status = eConnectionStatusNoConnection;
478 size_t bytes_sent = src_len;
479 error = m_write_sp->Write(src, bytes_sent);
483 log->Printf("%p ConnectionFileDescriptor::Write(fd = %" PRIu64 ", src = %p, src_len = %" PRIu64 ") => %" PRIu64 " (error = %s)",
484 static_cast<void *>(this), static_cast<uint64_t>(m_write_sp->GetWaitableHandle()), static_cast<const void *>(src),
485 static_cast<uint64_t>(src_len), static_cast<uint64_t>(bytes_sent), error.AsCString());
493 switch (error.GetError())
497 status = eConnectionStatusSuccess;
500 case ECONNRESET: // The connection is closed by the peer during a read attempt on a socket.
501 case ENOTCONN: // A read is attempted on an unconnected socket.
502 status = eConnectionStatusLostConnection;
503 break; // Break to close....
506 status = eConnectionStatusError;
507 break; // Break to close....
513 status = eConnectionStatusSuccess;
518 ConnectionFileDescriptor::GetURI()
523 // This ConnectionFileDescriptor::BytesAvailable() uses select().
526 // - select is consistent across most unix platforms
527 // - The Apple specific version allows for unlimited fds in the fd_sets by
528 // setting the _DARWIN_UNLIMITED_SELECT define prior to including the
529 // required header files.
531 // - on non-Apple platforms, only supports file descriptors up to FD_SETSIZE.
532 // This implementation will assert if it runs into that hard limit to let
533 // users know that another ConnectionFileDescriptor::BytesAvailable() should
534 // be used or a new version of ConnectionFileDescriptor::BytesAvailable()
535 // should be written for the system that is running into the limitations.
537 #if defined(__APPLE__)
538 #define FD_SET_DATA(fds) fds.data()
540 #define FD_SET_DATA(fds) &fds
544 ConnectionFileDescriptor::BytesAvailable(uint32_t timeout_usec, Error *error_ptr)
546 // Don't need to take the mutex here separately since we are only called from Read. If we
547 // ever get used more generally we will need to lock here as well.
549 Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_CONNECTION));
551 log->Printf("%p ConnectionFileDescriptor::BytesAvailable (timeout_usec = %u)", static_cast<void *>(this), timeout_usec);
553 struct timeval *tv_ptr;
555 if (timeout_usec == UINT32_MAX)
562 TimeValue time_value;
563 time_value.OffsetWithMicroSeconds(timeout_usec);
564 tv.tv_sec = time_value.seconds();
565 tv.tv_usec = time_value.microseconds();
569 // Make a copy of the file descriptors to make sure we don't
570 // have another thread change these values out from under us
571 // and cause problems in the loop below where like in FS_SET()
572 const IOObject::WaitableHandle handle = m_read_sp->GetWaitableHandle();
573 const int pipe_fd = m_pipe.GetReadFileDescriptor();
575 if (handle != IOObject::kInvalidHandleValue)
577 #if defined(_MSC_VER)
578 // select() won't accept pipes on Windows. The entire Windows codepath needs to be
579 // converted over to using WaitForMultipleObjects and event HANDLEs, but for now at least
580 // this will allow ::select() to not return an error.
581 const bool have_pipe_fd = false;
583 const bool have_pipe_fd = pipe_fd >= 0;
584 #if !defined(__APPLE__)
585 assert(handle < FD_SETSIZE);
587 assert(pipe_fd < FD_SETSIZE);
590 while (handle == m_read_sp->GetWaitableHandle())
592 const int nfds = std::max<int>(handle, pipe_fd) + 1;
593 #if defined(__APPLE__)
594 llvm::SmallVector<fd_set, 1> read_fds;
595 read_fds.resize((nfds / FD_SETSIZE) + 1);
596 for (size_t i = 0; i < read_fds.size(); ++i)
597 FD_ZERO(&read_fds[i]);
598 // FD_SET doesn't bounds check, it just happily walks off the end
599 // but we have taken care of making the extra storage with our
600 // SmallVector of fd_set objects
605 FD_SET(handle, FD_SET_DATA(read_fds));
607 FD_SET(pipe_fd, FD_SET_DATA(read_fds));
615 "%p ConnectionFileDescriptor::BytesAvailable() ::select (nfds=%i, fds={%i, %i}, NULL, NULL, timeout=%p)...",
616 static_cast<void *>(this), nfds, handle, pipe_fd, static_cast<void *>(tv_ptr));
618 log->Printf("%p ConnectionFileDescriptor::BytesAvailable() ::select (nfds=%i, fds={%i}, NULL, NULL, timeout=%p)...",
619 static_cast<void *>(this), nfds, handle, static_cast<void *>(tv_ptr));
622 const int num_set_fds = ::select(nfds, FD_SET_DATA(read_fds), NULL, NULL, tv_ptr);
624 error.SetErrorToErrno();
631 log->Printf("%p ConnectionFileDescriptor::BytesAvailable() ::select (nfds=%i, fds={%i, %i}, NULL, NULL, timeout=%p) "
633 static_cast<void *>(this), nfds, handle, pipe_fd, static_cast<void *>(tv_ptr), num_set_fds,
636 log->Printf("%p ConnectionFileDescriptor::BytesAvailable() ::select (nfds=%i, fds={%i}, NULL, NULL, timeout=%p) => "
638 static_cast<void *>(this), nfds, handle, static_cast<void *>(tv_ptr), num_set_fds, error.AsCString());
646 switch (error.GetError())
648 case EBADF: // One of the descriptor sets specified an invalid descriptor.
649 return eConnectionStatusLostConnection;
651 case EINVAL: // The specified time limit is invalid. One of its components is negative or too large.
652 default: // Other unknown error
653 return eConnectionStatusError;
655 case EAGAIN: // The kernel was (perhaps temporarily) unable to
656 // allocate the requested number of file descriptors,
657 // or we have non-blocking IO
658 case EINTR: // A signal was delivered before the time limit
659 // expired and before any of the selected events
661 break; // Lets keep reading to until we timeout
664 else if (num_set_fds == 0)
666 return eConnectionStatusTimedOut;
668 else if (num_set_fds > 0)
670 if (FD_ISSET(handle, FD_SET_DATA(read_fds)))
671 return eConnectionStatusSuccess;
672 if (have_pipe_fd && FD_ISSET(pipe_fd, FD_SET_DATA(read_fds)))
674 // We got a command to exit. Read the data from that pipe:
680 bytes_read = ::read(pipe_fd, buffer, sizeof(buffer));
681 } while (bytes_read < 0 && errno == EINTR);
687 log->Printf("%p ConnectionFileDescriptor::BytesAvailable() got data: %*s from the command channel.",
688 static_cast<void *>(this), static_cast<int>(bytes_read), buffer);
689 return eConnectionStatusEndOfFile;
691 // Interrupt the current read
692 return eConnectionStatusInterrupted;
700 error_ptr->SetErrorString("not connected");
701 return eConnectionStatusLostConnection;
705 ConnectionFileDescriptor::NamedSocketAccept(const char *socket_name, Error *error_ptr)
707 Socket *socket = nullptr;
708 Error error = Socket::UnixDomainAccept(socket_name, m_child_processes_inherit, socket);
711 m_write_sp.reset(socket);
712 m_read_sp = m_write_sp;
715 return eConnectionStatusError;
717 m_uri.assign(socket_name);
718 return eConnectionStatusSuccess;
722 ConnectionFileDescriptor::NamedSocketConnect(const char *socket_name, Error *error_ptr)
724 Socket *socket = nullptr;
725 Error error = Socket::UnixDomainConnect(socket_name, m_child_processes_inherit, socket);
728 m_write_sp.reset(socket);
729 m_read_sp = m_write_sp;
732 return eConnectionStatusError;
734 m_uri.assign(socket_name);
735 return eConnectionStatusSuccess;
739 ConnectionFileDescriptor::SocketListenAndAccept(const char *s, Error *error_ptr)
741 m_port_predicate.SetValue(0, eBroadcastNever);
743 Socket *socket = nullptr;
744 m_waiting_for_accept = true;
745 Error error = Socket::TcpListen(s, m_child_processes_inherit, socket, &m_port_predicate);
749 return eConnectionStatusError;
751 std::unique_ptr<Socket> listening_socket_up;
753 listening_socket_up.reset(socket);
755 error = listening_socket_up->BlockingAccept(s, m_child_processes_inherit, socket);
756 listening_socket_up.reset();
760 return eConnectionStatusError;
762 m_write_sp.reset(socket);
763 m_read_sp = m_write_sp;
766 return eConnectionStatusError;
769 strm.Printf("connect://%s:%u",socket->GetRemoteIPAddress().c_str(), socket->GetRemotePortNumber());
770 m_uri.swap(strm.GetString());
771 return eConnectionStatusSuccess;
775 ConnectionFileDescriptor::ConnectTCP(const char *s, Error *error_ptr)
777 Socket *socket = nullptr;
778 Error error = Socket::TcpConnect(s, m_child_processes_inherit, socket);
781 m_write_sp.reset(socket);
782 m_read_sp = m_write_sp;
785 return eConnectionStatusError;
788 return eConnectionStatusSuccess;
792 ConnectionFileDescriptor::ConnectUDP(const char *s, Error *error_ptr)
794 Socket *send_socket = nullptr;
795 Socket *recv_socket = nullptr;
796 Error error = Socket::UdpConnect(s, m_child_processes_inherit, send_socket, recv_socket);
799 m_write_sp.reset(send_socket);
800 m_read_sp.reset(recv_socket);
803 return eConnectionStatusError;
806 return eConnectionStatusSuccess;
810 ConnectionFileDescriptor::GetListeningPort(uint32_t timeout_sec)
812 uint16_t bound_port = 0;
813 if (timeout_sec == UINT32_MAX)
814 m_port_predicate.WaitForValueNotEqualTo(0, bound_port);
817 TimeValue timeout = TimeValue::Now();
818 timeout.OffsetWithSeconds(timeout_sec);
819 m_port_predicate.WaitForValueNotEqualTo(0, bound_port, &timeout);
825 ConnectionFileDescriptor::GetChildProcessesInherit() const
827 return m_child_processes_inherit;
831 ConnectionFileDescriptor::SetChildProcessesInherit(bool child_processes_inherit)
833 m_child_processes_inherit = child_processes_inherit;