diff options
Diffstat (limited to 'source/Host/posix/LockFilePosix.cpp')
-rw-r--r-- | source/Host/posix/LockFilePosix.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/Host/posix/LockFilePosix.cpp b/source/Host/posix/LockFilePosix.cpp index 05423062bd44..a6eae95c333b 100644 --- a/source/Host/posix/LockFilePosix.cpp +++ b/source/Host/posix/LockFilePosix.cpp @@ -1,14 +1,15 @@ //===-- LockFilePosix.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 // //===----------------------------------------------------------------------===// #include "lldb/Host/posix/LockFilePosix.h" +#include "llvm/Support/Errno.h" + #include <fcntl.h> #include <unistd.h> @@ -28,7 +29,7 @@ Status fileLock(int fd, int cmd, int lock_type, const uint64_t start, fl.l_pid = ::getpid(); Status error; - if (::fcntl(fd, cmd, &fl) == -1) + if (llvm::sys::RetryAfterSignal(-1, ::fcntl, fd, cmd, &fl) == -1) error.SetErrorToErrno(); return error; |