# std.Progress: IPC fixes · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c564a16a01811c18113fe304dbc3e8255af9f172)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c564a16a01811c18113fe304dbc3e8255af9f172

Requested commit: c564a16a01811c18113fe304dbc3e8255af9f172

Commit: c564a16a01811c18113fe304dbc3e8255af9f172

Tree: 79779ef0cdb54747ff5eb1fc256b77d227a607cf

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Progress: IPC fixes

Reduce node_storage_buffer_len from 200 to 83. This makes messages over
the pipe fit in a single packet (4096 bytes). There is now a comptime
assert to ensure this. In practice this is plenty of storage because
typical terminal heights are significantly less than 83 rows.

Handling of split reads is fixed; instead of using a global
`remaining_read_trash_bytes`, the value is stored in the "saved
metadata" for the IPC node.

Saved metadata is split into two arrays so that the "find" operation can
quickly scan over fds for a match, looking at 332 bytes maximum, and
only reading the memory for the other data upon match. More typical
number of bytes read for this operation would be 0 (no child processes),
4 (1 child process), or 64 (16 child processes reporting progress).

Removed an align(4) that was leftover from an older design.

This also includes part of Jacob Young's not-yet-landed patch that
implements `writevNonblock`.

```

## Parents

- [30a35a897f2220d1b252d211c389cf0319170a94](https://git.cafe/gitcafe/zig/commit/30a35a897f2220d1b252d211c389cf0319170a94?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c564a16a01811c18113fe304dbc3e8255af9f172?format=markdown)
