*** empty log message ***

svn path=/trunk/boinc/; revision=4145
This commit is contained in:
Rom Walton 2004-09-02 22:34:35 +00:00
parent 9a1c7c572d
commit 3b81a23326
3 changed files with 29 additions and 5 deletions

View File

@ -16902,3 +16902,12 @@ David 2 Sept 2004
sched/
sched_shmem.h
Rom 2 Sep 2004
- BUGFIX: The active task destructor also tried to clean up dangling handles, so
after cleaning up a handle lets also set the handle value to NULL to keep it from
being acted on again.
client/
app.C
app_control.C

View File

@ -111,9 +111,18 @@ ACTIVE_TASK::ACTIVE_TASK() {
ACTIVE_TASK::~ACTIVE_TASK() {
#ifdef _WIN32
if (pid_handle) CloseHandle(pid_handle);
if (thread_handle) CloseHandle(thread_handle);
if (quitRequestEvent) CloseHandle(quitRequestEvent);
if (pid_handle) {
CloseHandle(pid_handle);
pid_handle = NULL;
}
if (thread_handle) {
CloseHandle(thread_handle);
thread_handle = NULL;
}
if (quitRequestEvent) {
CloseHandle(quitRequestEvent);
quitRequestEvent = NULL;
}
// detach from shared mem.
// This will destroy shmem seg since we're the last attachment
//

View File

@ -213,8 +213,14 @@ bool ACTIVE_TASK::handle_exited_app(unsigned long exit_code) {
if (pending_suspend_via_quit) {
pending_suspend_via_quit = false;
state = PROCESS_UNINITIALIZED;
CloseHandle(pid_handle);
CloseHandle(thread_handle);
if (pid_handle) {
CloseHandle(pid_handle);
pid_handle = NULL;
}
if (thread_handle) {
CloseHandle(thread_handle);
thread_handle = NULL;
}
return true;
}
if (!finish_file_present()) {