+ sz = btr_pool_get_buffer(sit->btrp, &buf);
+ if (sz == 0)
+ return;
+ /*
+ * Do not use the maximal size to avoid having only a single buffer
+ * reference for the whole pool. This is bad because if that single
+ * reference can not be freed, we're stuck.
+ */
+ sz = PARA_MIN(sz, btr_pool_size(sit->btrp) / 2);
+ ret = read(STDIN_FILENO, buf, sz);
+ if (ret < 0)
+ ret = -ERRNO_TO_PARA_ERROR(errno);
+ if (ret == 0)
+ ret = -E_STDIN_EOF;