mirror of https://github.com/BOINC/boinc.git
Mac client: fill in command field of PROCINFO struct more efficiently
svn path=/trunk/boinc/; revision=17775
This commit is contained in:
parent
5800130fae
commit
930d3c08a3
|
@ -3709,7 +3709,7 @@ Charlie 8 Apr 2009
|
|||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
|
||||
Charlie 8 Apr 2009
|
||||
Charlie 9 Apr 2009
|
||||
- Mac client: fill in command field of PROCINFO struct so <exclusive_app>
|
||||
log flag works properly on Mac.
|
||||
|
||||
|
|
|
@ -97,9 +97,10 @@ int procinfo_setup(vector<PROCINFO>& pi) {
|
|||
|
||||
while (1) {
|
||||
memset(&p, 0, sizeof(p));
|
||||
c = fscanf(fd, "%d%d%d%d%ld%d:%lf %[^\n]", &p.id, &p.parentid, &real_mem,
|
||||
&virtual_mem, &p.page_fault_count, &hours, &p.user_time, p.command);
|
||||
c = fscanf(fd, "%d%d%d%d%ld%d:%lf ", &p.id, &p.parentid, &real_mem,
|
||||
&virtual_mem, &p.page_fault_count, &hours, &p.user_time);
|
||||
if (c < 7) break;
|
||||
if (fgets(p.command, sizeof(p.command) , fd) == NULL) break;
|
||||
p.working_set_size = (double)real_mem * 1024.;
|
||||
p.swap_size = (double)virtual_mem * 1024.;
|
||||
p.user_time += 60. * (float)hours;
|
||||
|
|
Loading…
Reference in New Issue