MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / safe_write

Function safe_write

src/debug.cpp:1651–1661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1649}
1650
1651void 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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected