From 06387d1a25d66065a5f8af112aa81030bb45765d Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Tue, 17 Dec 2002 23:46:35 +0000 Subject: [PATCH] suspend/resume by handle instead of file svn path=/trunk/boinc/; revision=754 --- client/app.C | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/client/app.C b/client/app.C index 79babaa9b3..91ac7917d5 100644 --- a/client/app.C +++ b/client/app.C @@ -577,14 +577,7 @@ void ACTIVE_TASK_SET::exit_tasks() { // int ACTIVE_TASK::suspend() { #ifdef _WIN32 - char susp_file[256]; - - get_slot_dir(slot, slot_dir); - sprintf(susp_file, "%s%s%s", slot_dir, PATH_SEPARATOR, SUSPEND_QUIT_FILE); - FILE *fp = fopen(susp_file, "w"); - if (!fp) return ERR_FOPEN; - write_suspend_quit_file(fp, true, false); - fclose(fp); + SuspendThread( thread_handle ); #else kill(pid, SIGSTOP); #endif @@ -595,14 +588,7 @@ int ACTIVE_TASK::suspend() { // int ACTIVE_TASK::unsuspend() { #ifdef _WIN32 - char susp_file[256]; - - get_slot_dir(slot, slot_dir); - sprintf(susp_file, "%s%s%s", slot_dir, PATH_SEPARATOR, SUSPEND_QUIT_FILE); - FILE *fp = fopen(susp_file, "w"); - if (!fp) return ERR_FOPEN; - write_suspend_quit_file(fp, false, false); - fclose(fp); + ResumeThread( thread_handle ); #else kill(pid, SIGCONT); #endif