add a mechanism so that apps can report sub-processes
that are not descendants (e.g., virtual machines)
These processes are then counted as part of the app,
not as "non-BOINC CPU time".
This fixes a bug where processing was incorrectly suspended
because CPU usage by VM apps exceeded the "CPU usage limit" pref.
Implementation:
- the PIDs of the processes in question
are passed from app to client via shared-memory,
in the app_status channel.
A new variant of boinc_report_app_status() supports this.
- the VBox wrapper queries the PID of the VM,
and reports it in this way.
- procinfo_app() includes a new argument: a list of PIDs
that are part of the app, although not ancestrally
related to the main process.
- in the client, ACTIVE_TASK now includes a vector "other_pids".
If this is nonempty, it's passed to procinfo_app().
svn path=/trunk/boinc/; revision=24123
proc_control: controlling processes
procinfo: enumerating and querying processes
run_app_windows: launching apps as other users on Win
svn path=/trunk/boinc/; revision=24120
used for system process info
Old: vector of PROCINFO.
Descendants of a process were found by recursively
iterating through the vector.
Operations are O(n)
New: map of (id, PROCINFO),
and each PROCINFO has a vector of its children.
Operations are O(log(n))
Also combined Mac/Win/Linux variants of code that
was essentially the same.
svn path=/trunk/boinc/; revision=24117
i.e. those that create subprocesses.
Previously, the client's job control options (suspend/resume/quit)
would not work for subprocesses.
Multiprocess apps must initialize with something like:
BOINC_OPTIONS options;
boinc_options_defaults(options);
options.multi_process = true;
boinc_init_options(&options);
Note: an application can be both multi-thread and multi-process.
In this case set options.multi_thread as well.
- wrapper: add support for multi-process apps.
Previously, suspend/resume operations did not work for subprocesses.
If a task is multi-process, you must include
<multi_process>1</multi_process>
in its descriptor.
svn path=/trunk/boinc/; revision=23369
Win: enumerate all descendants, and kill them all TerminateProcess().
Unix:
send the main process a SIGTERM.
Check once a sec for existence of descendants.
if none, done
If any still exist after 10 sec, kill all descendants
- wrapper fix bug in Win env var stuff
- scheduler: check for VBox version 3.2+ in app_plan()
svn path=/trunk/boinc/; revision=23085
don't include it in non-BOINC CPU time.
Otherwise the presence of such a process could
prevent BOINC from running apps.
(Windows only - will do Unix/Mac later)
svn path=/trunk/boinc/; revision=22422
- scheduler: fix bug in adaptive replication:
if send an unreplicated job to untrusted host,
set both wu.target_nresults and wu.min_quorum to app.target_nresults.
svn path=/trunk/boinc/; revision=15762