[flang-commits] [flang] [flang] use setsid to assign the child to prevent zombie as it will be clean up by init process (PR #77944)

via flang-commits flang-commits at lists.llvm.org
Fri Jan 12 08:57:35 PST 2024


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 35c19fdde2583e74d940f6cd47b97a5c28bfe368 b51f293d57a1ae96fab5d3b2a529186a78643c8c -- flang/runtime/execute.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/runtime/execute.cpp b/flang/runtime/execute.cpp
index 1bd5bb81ec..d149b5d47e 100644
--- a/flang/runtime/execute.cpp
+++ b/flang/runtime/execute.cpp
@@ -191,13 +191,13 @@ void RTNAME(ExecuteCommandLine)(const Descriptor &command, bool wait,
     } else if (pid == 0) {
       if (setsid() == -1) {
         if (!cmdstat) {
-          terminator.Crash(
-              "setsid() failed with errno: %d, asynchronous process initiation failed.",
+          terminator.Crash("setsid() failed with errno: %d, asynchronous "
+                           "process initiation failed.",
               errno);
         } else {
           StoreIntToDescriptor(cmdstat, ASYNC_NO_SUPPORT_ERR, terminator);
-          CheckAndCopyCharsToDescriptor(
-              cmdmsg, "setsid() failed, asynchronous process initiation failed.");
+          CheckAndCopyCharsToDescriptor(cmdmsg,
+              "setsid() failed, asynchronous process initiation failed.");
         }
         exit(EXIT_FAILURE);
       }

``````````

</details>


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


More information about the flang-commits mailing list