Update src/lcpex/liblcpex.cpp
parent
2904e9dcd8
commit
cddc271ac7
|
@ -1,19 +1,5 @@
|
||||||
#include "liblcpex.h"
|
#include "liblcpex.h"
|
||||||
|
|
||||||
ssize_t write_all(int fd, const void *buf, size_t count) {
|
|
||||||
const char *p = (const char *)buf;
|
|
||||||
while (count > 0) {
|
|
||||||
ssize_t written = write(fd, p, count);
|
|
||||||
if (written == -1) {
|
|
||||||
if (errno == EINTR || errno == EAGAIN) continue; // Retry
|
|
||||||
return -1; // Other errors
|
|
||||||
}
|
|
||||||
count -= written;
|
|
||||||
p += written;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
std::string prefix_generator(
|
std::string prefix_generator(
|
||||||
std::string command,
|
std::string command,
|
||||||
|
|
Loading…
Reference in New Issue