@@ -238,33 +238,43 @@ struct ACTIVE_TASK {
238238
239239 // Termination stuff.
240240 // Terminology:
241- // "kill": forcibly kill the main process and all its descendants.
242- // "request exit": send a request-exit message, and enumerate descendants.
241+ // "kill" means kill the main process and all its descendants,
242+ // with SIGKILL on Unix or TerminateProcess on Win
243+ // "request_quit": send a quit message, and enumerate descendants.
243244 // If after 15 secs any processes remain, kill them
245+ // Use this if the job will be restarted in the future.
244246 // called from:
245247 // task preemption
246- // project detach or reset
248+ // client exit
247249 // implementation:
248250 // sends msg, sets quit_time, state QUIT_PENDING;
249251 // get list of descendants
250252 // normal exit handled in handle_premature_exit()
251253 // timeout handled in ACTIVE_TASK_SET::poll()
252- // "abort_task": like request exit,
253- // but the app is supposed to write a stack trace to stderr
254- // called from: rsc exceeded; got ack of running task;
254+ // "request_abort": like request quit,
255+ // but send an abort message rather than quit.
256+ // Use this if the job won't be restarted.
257+ // called from:
258+ // project detach or reset
259+ // rsc limit exceeded
260+ // abort request from server
255261 // intermediate upload failure
256262 // client exiting w/ abort_jobs_on_exit set
263+ // If it gets this, the BOINC API library
264+ // tries to write the call stack to stderr
265+ // so you can e.g. see where an infinite loop happened
257266 //
258- int request_exit ();
267+ int request_quit ();
259268 int request_abort ();
260269 int kill_running_task (bool will_restart);
261- // Kill process and subsidiary processes forcibly.
262- // Unix: send a SIGKILL signal, Windows: TerminateProcess()
270+ // Kill process and subsidiary processes.
263271 int kill_subsidiary_processes ();
264272 // kill subsidiary processes of a job
265273 // whose main process has already exited
266274 int abort_task (int exit_status, const char *);
267275 // can be called whether or not process exists
276+ // if process exists, request_abort()
277+ // else just mark task as aborted
268278
269279 // is the GPU task running or suspended (due to CPU throttling)
270280 //
@@ -283,8 +293,8 @@ struct ACTIVE_TASK {
283293 // return true if this task has exited
284294
285295 int suspend ();
286- // tell a process to stop executing (but stay in mem)
287- // Done by sending it a <suspend> message
296+ // sending process a <suspend> message;
297+ // tells it to stop executing but stay in mem
288298 int unsuspend (int reason=0 );
289299 // Undo a suspend: send a <resume> message
290300 int preempt (PREEMPT_TYPE preempt_type, int reason=0 );
@@ -338,9 +348,9 @@ class ACTIVE_TASK_SET {
338348 void suspend_all (int reason);
339349 void unsuspend_all (int reason=0 );
340350 bool is_task_executing ();
341- void request_tasks_exit (PROJECT* p= 0 );
342- int wait_for_exit (double , PROJECT* p= 0 );
343- int exit_tasks (PROJECT* p= 0 );
351+ void request_tasks_exit (bool will_restart, PROJECT* p);
352+ int wait_for_exit (double , PROJECT* p);
353+ int exit_tasks (bool will_restart, PROJECT* p);
344354 void kill_tasks (PROJECT* p=0 );
345355 int abort_project (PROJECT*);
346356 void get_msgs ();
0 commit comments