diff --git a/checkin_notes b/checkin_notes index 886fdae51d..acdf000053 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3279,11 +3279,11 @@ David 6 Apr 2007 sim.C,h David 6 Apr 2007 - - core client: sanity check on work request size - (from John McLeod) + - core client: sanity check on work request size + (from John McLeod) - client/ - work_fetch.C + client/ + work_fetch.C David 8 Apr 2007 - updater: @@ -3313,3 +3313,11 @@ David 8 Apr 2007 util.C,h tools/ updater.C + +David 9 Apr 2007 + - win compile fixes + + client/ + auto_update.C + lib/ + util.C diff --git a/client/auto_update.C b/client/auto_update.C index eafb9caffb..086136cb21 100644 --- a/client/auto_update.C +++ b/client/auto_update.C @@ -174,7 +174,12 @@ void AUTO_UPDATE::install() { char version_dir[1024]; char cwd[256]; char* argv[10]; - int retval, argc, pid; + int retval, argc; +#ifdef _WIN32 + HANDLE pid; +#else + int pid; +#endif msg_printf(NULL, MSG_INFO, "Installing new version of BOINC: %d.%d.%d", version.major, version.minor, version.release diff --git a/lib/util.C b/lib/util.C index 86ccdf4d8e..c9cf83a5af 100755 --- a/lib/util.C +++ b/lib/util.C @@ -417,6 +417,7 @@ int run_program( PROCESS_INFORMATION process_info; STARTUPINFO startup_info; char cmdline[1024], path[1024]; + unsigned long status; memset(&process_info, 0, sizeof(process_info)); memset(&startup_info, 0, sizeof(startup_info)); @@ -443,7 +444,7 @@ int run_program( if (retval) return retval; if (nsecs) { boinc_sleep(nsecs); - if (GetExitCodeProcess(pid_handle, &status)) { + if (GetExitCodeProcess(process_info.hProcess, &status)) { if (status != STILL_ACTIVE) { return -1; } @@ -479,7 +480,7 @@ int run_program( #ifdef _WIN32 void kill_program(HANDLE pid) { - TerminateProcess(pid); + TerminateProcess(pid, 0); } #else void kill_program(int pid) { @@ -498,6 +499,7 @@ int get_exit_status(HANDLE pid_handle) { } } return (int) status; +} #else int get_exit_status(int pid) { int status;