Fixed storage and descriptor syscalls only in the post-fork failure path. * EAGAIN is evidence solely under intact, never-drained exclusive custody. * Unsupported transport loss cannot report itself magically to the parent. */
| 1306 | * EAGAIN is evidence solely under intact, never-drained exclusive custody. |
| 1307 | * Unsupported transport loss cannot report itself magically to the parent. */ |
| 1308 | static void tf_coverage_channel_notify(void) { |
| 1309 | int saved_errno = errno; |
| 1310 | if (tf_coverage_channel.active && !tf_coverage_channel.transport_broken) { |
| 1311 | bool delivered = false; |
| 1312 | if (tf_coverage_channel_intact()) { |
| 1313 | const unsigned char byte = 1; |
| 1314 | ssize_t written; |
| 1315 | do { |
| 1316 | written = write(tf_coverage_channel.fd[1], &byte, sizeof(byte)); |
| 1317 | } while (written < 0 && errno == EINTR); |
| 1318 | delivered = written == 1 || (written < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)); |
| 1319 | } |
| 1320 | tf_coverage_channel.transport_broken = !delivered; |
| 1321 | } |
| 1322 | errno = saved_errno; |
| 1323 | } |
| 1324 | #endif /* !_WIN32 */ |
| 1325 | |
| 1326 | /* Names the profile this process writes next and the one its children will. */ |
no test coverage detected