| 1649 | } |
| 1650 | |
| 1651 | void safe_write(int fd, const void *pv, ssize_t cb) |
| 1652 | { |
| 1653 | ssize_t offset = 0; |
| 1654 | do |
| 1655 | { |
| 1656 | ssize_t cbWrite = write(fd, reinterpret_cast<const char*>(pv)+offset, cb-offset); |
| 1657 | if (cbWrite <= 0) |
| 1658 | return; |
| 1659 | offset += cbWrite; |
| 1660 | } while (offset < cb); |
| 1661 | } |
| 1662 | |
| 1663 | #ifdef UNW_LOCAL_ONLY |
| 1664 |
no outgoing calls
no test coverage detected