| 101 | } |
| 102 | |
| 103 | void sharedMemoryClose(sharedMemoryInfo *info) { |
| 104 | #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) |
| 105 | if (info->addr) { |
| 106 | UnmapViewOfFile(info->addr); |
| 107 | } |
| 108 | if (info->shmHandle) { |
| 109 | CloseHandle(info->shmHandle); |
| 110 | } |
| 111 | #else |
| 112 | if (info->addr) { |
| 113 | munmap(info->addr, info->size); |
| 114 | } |
| 115 | if (info->shmFd) { |
| 116 | close(info->shmFd); |
| 117 | } |
| 118 | #endif |
| 119 | } |
| 120 | |
| 121 | int spawnProcess(Process *process, const char *app, char *const *args) { |
| 122 | #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) |