- client (Mac): there was no error check of the creation

of a memory-mapped file used for communication with an app.
     Add a check, and don't start the job if it fails.


svn path=/trunk/boinc/; revision=24347
This commit is contained in:
David Anderson 2011-10-07 20:05:54 +00:00
parent c6327eeb73
commit 0e225d889d
2 changed files with 15 additions and 0 deletions

View File

@ -6927,3 +6927,11 @@ David 7 Oct 2011
lib/ lib/
coproc.cpp,h coproc.cpp,h
David 7 Oct 2011
- client (Mac): there was no error check of the creation
of a memory-mapped file used for communication with an app.
Add a check, and don't start the job if it fails.
client/
app_start.cpp

View File

@ -841,6 +841,13 @@ int ACTIVE_TASK::start(bool first_time) {
retval = create_shmem_mmap( retval = create_shmem_mmap(
buf, sizeof(SHARED_MEM), (void**)&app_client_shm.shm buf, sizeof(SHARED_MEM), (void**)&app_client_shm.shm
); );
if (retval) {
msg_printf(wup->project, MSG_INTERNAL_ERROR,
"ACTIVE_TASK::start(): can't create memory-mapped file: %s",
boincerror(retval)
);
return retval;
}
} else { } else {
// Use shmget() shared memory // Use shmget() shared memory
retval = create_shmem( retval = create_shmem(