| 67 | } |
| 68 | |
| 69 | void shared_create(SharedData* data, const char* name, void* bytes, size_t nbytes) |
| 70 | { |
| 71 | int d = shm_open(name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); |
| 72 | if (d != -1) { |
| 73 | if (nbytes = write(d, bytes, nbytes)) { shared_open(data, name, nbytes); } |
| 74 | } else { |
| 75 | printf("shared_create %s failed\n", name); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void shared_close(SharedData* data) |
| 80 | { |
no test coverage detected