[libc-commits] [libc] [libc] Implement lockf in unistd (#230856) (PR #231145)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 13 08:04:06 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- libc/src/unistd/linux/lockf.cpp libc/src/unistd/lockf.h libc/test/integration/src/unistd/lockf_test.cpp libc/test/src/unistd/lockf_test.cpp libc/hdr/unistd_macros.h libc/include/llvm-libc-macros/linux/unistd-macros.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/test/integration/src/unistd/lockf_test.cpp b/libc/test/integration/src/unistd/lockf_test.cpp
index ebd35f478..7c7ee64bb 100644
--- a/libc/test/integration/src/unistd/lockf_test.cpp
+++ b/libc/test/integration/src/unistd/lockf_test.cpp
@@ -42,7 +42,8 @@ TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
if (child_fd < 0)
LIBC_NAMESPACE::exit(1);
- // F_TEST should fail because the section is locked by another process (parent).
+ // F_TEST should fail because the section is locked by another process
+ // (parent).
if (LIBC_NAMESPACE::lockf(child_fd, F_TEST, 0) == 0)
LIBC_NAMESPACE::exit(2);
if (errno != EACCES && errno != EAGAIN)
``````````
</details>
https://github.com/llvm/llvm-project/pull/231145
More information about the libc-commits
mailing list