summaryrefslogtreecommitdiff
path: root/source/Host/posix/ProcessLauncherPosixFork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/posix/ProcessLauncherPosixFork.cpp')
-rw-r--r--source/Host/posix/ProcessLauncherPosixFork.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/Host/posix/ProcessLauncherPosixFork.cpp b/source/Host/posix/ProcessLauncherPosixFork.cpp
index 6bf78463d060..185c7f0fe248 100644
--- a/source/Host/posix/ProcessLauncherPosixFork.cpp
+++ b/source/Host/posix/ProcessLauncherPosixFork.cpp
@@ -1,9 +1,8 @@
-//===-- ProcessLauncherLinux.cpp --------------------------------*- C++ -*-===//
+//===-- ProcessLauncherPosixFork.cpp ----------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -11,7 +10,7 @@
#include "lldb/Host/Host.h"
#include "lldb/Host/HostProcess.h"
#include "lldb/Host/Pipe.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Log.h"
#include "llvm/Support/Errno.h"
@@ -73,7 +72,8 @@ static void DisableASLRIfRequested(int error_fd, const ProcessLaunchInfo &info)
static void DupDescriptor(int error_fd, const FileSpec &file_spec, int fd,
int flags) {
- int target_fd = ::open(file_spec.GetCString(), flags, 0666);
+ int target_fd = llvm::sys::RetryAfterSignal(-1, ::open,
+ file_spec.GetCString(), flags, 0666);
if (target_fd == -1)
ExitWithError(error_fd, "DupDescriptor-open");
@@ -212,7 +212,7 @@ ProcessLauncherPosixFork::LaunchProcess(const ProcessLaunchInfo &launch_info,
error.SetErrorString(buf);
- waitpid(pid, nullptr, 0);
+ llvm::sys::RetryAfterSignal(-1, waitpid, pid, nullptr, 0);
return HostProcess();
}