[libc-commits] [libc] [libc] Implement killpg (PR #237561)

via libc-commits libc-commits at lists.llvm.org
Sat Oct 31 14:16:41 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 cpp,h -- libc/src/signal/killpg.h libc/src/signal/linux/killpg.cpp libc/test/src/signal/killpg_test.cpp --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/src/signal/linux/killpg.cpp b/libc/src/signal/linux/killpg.cpp
index e2bcae56d..2964efa45 100644
--- a/libc/src/signal/linux/killpg.cpp
+++ b/libc/src/signal/linux/killpg.cpp
@@ -16,10 +16,10 @@
 
 namespace LIBC_NAMESPACE_DECL {
 LLVM_LIBC_FUNCTION(int, killpg, (pid_t pgrp, int sig)) {
-    if(pgrp < 0) {
-        libc_errno = EINVAL;
-        return -1;
-    }
-    return LIBC_NAMESPACE::kill(-pgrp, sig);
- } 
-} //namespace LIBC_NAMESPACE_DECL
\ No newline at end of file
+  if (pgrp < 0) {
+    libc_errno = EINVAL;
+    return -1;
+  }
+  return LIBC_NAMESPACE::kill(-pgrp, sig);
+}
+} // namespace LIBC_NAMESPACE_DECL
\ No newline at end of file

``````````

</details>


https://github.com/llvm/llvm-project/pull/237561


More information about the libc-commits mailing list