diff --git a/checkin_notes b/checkin_notes
index 29bf6a56cf..554b83b962 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -16637,13 +16637,14 @@ David 23 Aug 2004
ACTIVE_TASK_SET::unsuspend_all():
Removed code that checks for process exit.
Poll code should take care of this.
-
+ - enabled preemption by quit
- add MSG_CHANNEL::send_msg_overwrite(): send message even
if there's already a message there.
Use this for process control messages.
-
- API: if suspended, check for messages as well as
(this affects Unix only)
+ - add enclosing tag for app init data file (so XML parsers accept it)
+
api/
boinc_api.C
client/
diff --git a/client/app_graphics.C b/client/app_graphics.C
index b43744fcbf..df81cbfa97 100644
--- a/client/app_graphics.C
+++ b/client/app_graphics.C
@@ -117,6 +117,7 @@ void ACTIVE_TASK_SET::graphics_poll() {
for (i=0; iprocess_exists()) continue;
if (atp->graphics_mode_requested != atp->graphics_mode_sent) {
sent = atp->send_graphics_mode(atp->graphics_mode_requested);
if (sent) {
diff --git a/client/cs_apps.C b/client/cs_apps.C
index c5939d3795..c98be736b2 100644
--- a/client/cs_apps.C
+++ b/client/cs_apps.C
@@ -431,7 +431,9 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) {
if (atp->scheduler_state == CPU_SCHED_SCHEDULED
&& atp->next_scheduler_state == CPU_SCHED_PREEMPTED
) {
- atp->preempt(active_tasks.vm_limit_exceeded(vm_limit));
+ bool preempt_by_quit = !global_prefs.leave_apps_in_memory;
+ preempt_by_quit |= active_tasks.vm_limit_exceeded(vm_limit);
+ atp->preempt(preempt_by_quit);
iter++;
} else if (atp->scheduler_state != CPU_SCHED_SCHEDULED
&& atp->next_scheduler_state == CPU_SCHED_SCHEDULED
diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp
index 39a314ec33..761cf75f48 100755
--- a/client/win/wingui_mainwindow.cpp
+++ b/client/win/wingui_mainwindow.cpp
@@ -494,7 +494,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs)
break;
case RESULT_FILES_DOWNLOADED:
if (at) {
- if (at->scheduler_state == CPU_SCHED_RUNNING) {
+ if (at->scheduler_state == CPU_SCHED_SCHEDULED) {
strBuf.Format(g_szMiscItems[1]);
} else if (at->scheduler_state == CPU_SCHED_PREEMPTED) {
strBuf.Format(g_szMiscItems[14]);
diff --git a/lib/app_ipc.C b/lib/app_ipc.C
index ec0b26aa94..1affa3dc93 100755
--- a/lib/app_ipc.C
+++ b/lib/app_ipc.C
@@ -47,7 +47,7 @@ char* xml_graphics_modes[NGRAPHICS_MSGS] = {
int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
string str1, str2;
- fprintf(f, "%d\n", ai.core_version);
+ fprintf(f, "\n%d\n", ai.core_version);
if (strlen(ai.app_name)) {
fprintf(f, "%s\n", ai.app_name);
}
@@ -105,6 +105,7 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
ai.fraction_done_start,
ai.fraction_done_end
);
+ fprintf(f, "\n");
MIOFILE mf;
mf.init_file(f);
ai.host_info.write(mf);