Changeset: 06b6904fce63 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=06b6904fce63 Modified Files: monetdb5/extras/pyapi/pyapi.c Branch: pyapi Log Message:
Fix infinite loop when shared memory fails. diffs (20 lines): diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c --- a/monetdb5/extras/pyapi/pyapi.c +++ b/monetdb5/extras/pyapi/pyapi.c @@ -1439,7 +1439,7 @@ returnvalues: ReturnBatDescr *ptr; shm_ptr = get_shared_memory(shm_id, memory_size); - if (shm_ptr == NULL) goto wrapup; + if (shm_ptr == NULL) exit(1); // To indicate that we failed, we will write information to our header ptr = (ReturnBatDescr*)shm_ptr; @@ -1455,6 +1455,7 @@ returnvalues: // We can simply use the slot shm_id + 1, even though this is normally used for return values // This is because, if any one process fails, no values will be returned error_mem = create_shared_memory(shm_id + 1, strlen(msg) * sizeof(char)); + if (error_mem == NULL) exit(1); for(iu = 0; iu < strlen(msg); iu++) { // Copy the error message to the shared memory error_mem[iu] = msg[iu]; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list