You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bound a pipe as well as a socket: a channel here is a pipe
⚠️ `WSAPoll' takes sockets and nothing else, so `kal_timeout_read' upon a
pipe reported `kal_err_not_supported' --- and `openkal.process' makes a
channel out of a pipe on this system. A C library above this
implementation therefore reaches `poll' and `select' upon one, and
openkal-musl's network probe reported it on the row that builds for this
system:
FAIL: select reports the read end ready (errno=38)
A `select' that refuses a pipe makes every program waiting on a
subprocess's output stop.
⭐ THREE ENQUIRIES, ONE PER KIND OF OBJECT, chosen by asking what the
handle is: `WSAPoll' for a socket, `PeekNamedPipe' for a pipe, and always
ready for a file, because a read from one does not wait. ⚠️ A socket also
reports `FILE_TYPE_PIPE', so the socket enquiry is made FIRST and the
file type only decides what a non-socket is.
⭐ `PeekNamedPipe' is the one NON-DESTRUCTIVE readiness enquiry in this
whole ecosystem: it reports how many bytes are there and takes none,
which is why this implementation needs no read-ahead where the port above
it does. ⚠️ A closed writing end is READY and not an error --- the call
then fails with `ERROR_BROKEN_PIPE' and the read that follows reports the
end of input without waiting, which is what readiness asserts. Reporting
the failure would make a program that reads until end-of-input wait for
ever instead.
What remains unbounded is a character device, and `kal_err_not_supported'
is what timeout.h states for a resource an implementation does not cover.
Measured here: 16 objects, exported surface complete at 88 names, no
undefined symbol outside the permitted set, 50 declared names and none
missing from a `.def'.
0 commit comments