refill-stdin ( buffer stdin size -- )


Vocabulary
io.backend.unix

Inputs
bufferan object
stdinan object
sizean object


Outputs
None

Definition


:: refill-stdin ( buffer stdin size -- )
stdin data>> handle-fd buffer buffer-end size read dup 0 < [
drop errno EINTR =
[ buffer stdin size refill-stdin ] [ throw-errno ] if
] [
size = [ "Error reading stdin pipe" throw ] unless
size buffer buffer+
] if ;