851 |
sharedMemory.handle = NULL; |
sharedMemory.handle = NULL; |
852 |
if (sharedMemory.address) UnmapViewOfFile(sharedMemory.address); |
if (sharedMemory.address) UnmapViewOfFile(sharedMemory.address); |
853 |
sharedMemory.address = NULL; |
sharedMemory.address = NULL; |
854 |
init_signals_pendingPtr(); |
gcl_init_signals_pendingPtr(); |
855 |
} |
} |
856 |
|
|
857 |
void init_shared_memory (void) |
void gcl_init_shared_memory (void) |
858 |
{ |
{ |
859 |
sprintf(sharedMemory.name,"gcl-%d",getpid()); |
sprintf(sharedMemory.name,"gcl-%d",getpid()); |
860 |
sharedMemory.handle = |
sharedMemory.handle = |
869 |
0); /* Map entire file. */ |
0); /* Map entire file. */ |
870 |
if (sharedMemory.address == NULL) |
if (sharedMemory.address == NULL) |
871 |
{ error("MapViewOfFile failed");} |
{ error("MapViewOfFile failed");} |
872 |
init_signals_pendingPtr(); |
gcl_init_signals_pendingPtr(); |
873 |
atexit(close_shared_memory); |
atexit(close_shared_memory); |
874 |
} |
} |
875 |
|
|