diff options
author | Yi Wu <43659785+yi-wu-arm@users.noreply.github.com> | 2024-01-19 14:18:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-19 14:18:57 +0000 |
commit | 5a7f9a5a9c85c9b7851bbf267f5a12b9211f810e (patch) | |
tree | 27106b6afbff4ecfc6df1ace6b8bb45d86750bfd /llvm/lib/FileCheck | |
parent | eaa8def929b17ea4c7a13a7bf860ac07bfd5bf14 (diff) | |
download | llvm-5a7f9a5a9c85c9b7851bbf267f5a12b9211f810e.zip llvm-5a7f9a5a9c85c9b7851bbf267f5a12b9211f810e.tar.gz llvm-5a7f9a5a9c85c9b7851bbf267f5a12b9211f810e.tar.bz2 |
[flang] use setsid to assign the child to prevent zombie as it will be clean up by init process (#77944)
When using `setsid()` in a child process created by `fork()`, a new
session is created, and the child becomes a session leader. If the
parent process terminates before the child, the child becomes an orphan
and is adopted by the `init` process. The `init` process will eventually
clean up the child process once it exits.
However, killing the parent does not automatically kill the child; the
child will continue running until it exits.
Proper cleanup involves waiting for the child process to exit using
`wait()` or `waitpid()` in the parent process to avoid zombie processes,
but this approach is not valid for `EXECUTE_COMMAND_LINE` with async
mode.
Fix: https://github.com/llvm/llvm-project/issues/77803
Diffstat (limited to 'llvm/lib/FileCheck')
0 files changed, 0 insertions, 0 deletions