Major update
- Add an IO system to hijack a bit of the terminal. - Other minor fixes.
This commit is contained in:
@@ -200,22 +200,6 @@ Shard *Shard::build(Shard **pieces, uint64_t lo, uint64_t hi) {
|
||||
return node;
|
||||
}
|
||||
|
||||
static bool write_all(int fd, const void *data, size_t len) {
|
||||
const char *p = (const char *)data;
|
||||
while (len > 0) {
|
||||
ssize_t n = write(fd, p, len);
|
||||
if (n > 0) {
|
||||
p += n;
|
||||
len -= (size_t)n;
|
||||
continue;
|
||||
}
|
||||
if (n == -1 && errno == EINTR)
|
||||
continue;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Shard *Shard::from_command(const char *cmd, OriginalBuffer *o, bool posix_ending) {
|
||||
int dest_fd = o->fd;
|
||||
if (dest_fd == -1)
|
||||
|
||||
Reference in New Issue
Block a user