aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2021-11-04 13:23:12 +0100
committerPavel Labath <pavel@labath.sk>2021-11-09 15:31:07 +0100
commita40929dcd295997736caf066758dd359216443c2 (patch)
treef96670a56568ed757bff2e329fc1228743909c1c /clang/lib/Basic/SourceManager.cpp
parent8cc2de667ec2526b055e971f46f4b3731107546c (diff)
downloadllvm-a40929dcd295997736caf066758dd359216443c2.zip
llvm-a40929dcd295997736caf066758dd359216443c2.tar.gz
llvm-a40929dcd295997736caf066758dd359216443c2.tar.bz2
[lldb] Fix cross-platform kills
This patch fixes an amusing bug where a Platform::Kill operation would happily terminate a proces on a completely different platform, as long as they have the same process ID. This was due to the fact that the implementation was iterating through all known (debugged) processes in order terminate them directly. This patch just deletes that logic, and makes everything go through the OS process termination APIs. While it would be possible to fix the logic to check for a platform match, it seemed to me that the implementation was being too smart for its own good -- accessing random Process objects without knowing anything about their state is risky at best. Going through the os ensures we avoid any races. I also "upgrade" the termination signal to a SIGKILL to ensure the process really dies after this operation. Differential Revision: https://reviews.llvm.org/D113184
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions