diff options
author | Greg Clayton <gclayton@apple.com> | 2013-06-27 00:23:57 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-06-27 00:23:57 +0000 |
commit | 6467ff9aea6bfceb26388180ec2d26bc93446ed0 (patch) | |
tree | 8300c261f3dad081a0d399890ff3206d9b579783 /lldb/tools/debugserver/source/DNB.cpp | |
parent | 8edefb36656acf28e0d081a5a5cb8fb7304a6395 (diff) | |
download | bcm5719-llvm-6467ff9aea6bfceb26388180ec2d26bc93446ed0.tar.gz bcm5719-llvm-6467ff9aea6bfceb26388180ec2d26bc93446ed0.zip |
<rdar://problem/14195566>
Found a race condition when killing an application where the state could be set to exited by the waitpid_thread() _before_ we call task resume (via MachProcess::PrivateResume()) in MachProcess::Kill().
llvm-svn: 185048
Diffstat (limited to 'lldb/tools/debugserver/source/DNB.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index bcbcf983ff7..d7955541f14 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -132,7 +132,7 @@ waitpid_thread (void *arg) while (1) { pid_t child_pid = waitpid(pid, &status, 0); - DNBLogThreadedIf(LOG_PROCESS, "waitpid_process_thread (): waitpid (pid = %i, &status, 0) => %i, status = %i, errno = %i", pid, child_pid, status, errno); + DNBLogThreadedIf(LOG_PROCESS, "waitpid_thread (): waitpid (pid = %i, &status, 0) => %i, status = %i, errno = %i", pid, child_pid, status, errno); if (child_pid < 0) { @@ -148,7 +148,7 @@ waitpid_thread (void *arg) } else// if (WIFEXITED(status) || WIFSIGNALED(status)) { - DNBLogThreadedIf(LOG_PROCESS, "waitpid_process_thread (): setting exit status for pid = %i to %i", child_pid, status); + DNBLogThreadedIf(LOG_PROCESS, "waitpid_thread (): setting exit status for pid = %i to %i", child_pid, status); DNBProcessSetExitStatus (child_pid, status); return NULL; } @@ -157,7 +157,7 @@ waitpid_thread (void *arg) // We should never exit as long as our child process is alive, so if we // do something else went wrong and we should exit... - DNBLogThreadedIf(LOG_PROCESS, "waitpid_process_thread (): main loop exited, setting exit status to an invalid value (-1) for pid %i", pid); + DNBLogThreadedIf(LOG_PROCESS, "waitpid_thread (): main loop exited, setting exit status to an invalid value (-1) for pid %i", pid); DNBProcessSetExitStatus (pid, -1); return NULL; } |