| 298 | } |
| 299 | #else |
| 300 | static bool config_write_all(int descriptor, const char *json, size_t json_length) { |
| 301 | size_t offset = 0; |
| 302 | while (offset < json_length) { |
| 303 | ssize_t written = write(descriptor, json + offset, json_length - offset); |
| 304 | if (written < 0 && errno == EINTR) { |
| 305 | continue; |
| 306 | } |
| 307 | if (written <= 0) { |
| 308 | return false; |
| 309 | } |
| 310 | offset += (size_t)written; |
| 311 | } |
| 312 | return true; |
| 313 | } |
| 314 | |
| 315 | static bool config_sync_descriptor(int descriptor) { |
| 316 | int result; |
no test coverage detected