- vboxwrapper: we don't seem to be getting the VM PID.

Add some printfs.


svn path=/trunk/boinc/; revision=24211
This commit is contained in:
David Anderson 2011-09-14 23:22:08 +00:00
parent 7411dd60aa
commit f6cd51fe72
2 changed files with 23 additions and 8 deletions

View File

@ -5864,10 +5864,10 @@ David 12 Sept 2011
cpu_sched.cpp
David 12 Sept 2011
- client: make file upload work w/ old handlers
- client: make file upload work w/ old handlers
client/
file_xfer.cpp
client/
file_xfer.cpp
David 12 Sept 2011
- web: add <no_web_account_creation> config option
@ -6009,10 +6009,10 @@ David 13 Sept 2011
http_curl.cpp
David 13 Sept 2011
- client: curl_easy_escape() escapes way too much. Just escape spaces.
- client: curl_easy_escape() escapes way too much. Just escape spaces.
client/
http_curl.cpp
client/
http_curl.cpp
David 14 Sept 2011
- XML parsing: do XML unescaping in place rather than allocating
@ -6052,3 +6052,10 @@ David 14 Sept 2011
client_state.cpp
coproc_detect.cpp
cpu_sched.cpp
David 14 Sept 2011
- vboxwrapper: we don't seem to be getting the VM PID.
Add some printfs.
samples/vboxwrapper/
vbox.cpp

View File

@ -1069,11 +1069,19 @@ int VBOX_VM::get_vm_process_id(int& process_id) {
// 00:00:06.015 None installed!
//
pid_location = output.find("Process ID: ");
if (pid_location == string::npos) return ERR_NOT_FOUND;
if (pid_location == string::npos) {
fprintf(stderr, "couldn't find 'Process ID: ' in %s\n", output.c_str());
return ERR_NOT_FOUND;
}
pid_location += 12;
pid_length = output.find("\n", pid_location);
pid = output.substr(pid_location, pid_length - pid_location);
if (pid.size() <= 0) return ERR_NOT_FOUND;
if (pid.size() <= 0) {
fprintf(stderr, "no PID: location %d length %d\n",
(int)pid_location, (int)pid_length
);
return ERR_NOT_FOUND;
}
process_id = atol(pid.c_str());
return 0;
}