- ret = read(STDIN_FILENO, buf, sz);
- if (ret < 0)
- ret = -ERRNO_TO_PARA_ERROR(errno);
- if (ret == 0)
- ret = -E_STDIN_EOF;
- if (ret < 0)
- goto err;
- btr_add_output_pool(sit->btrp, ret, sit->btrn);
- return;
+ ret = read_nonblock(STDIN_FILENO, buf, sz, &s->rfds, &n);
+ if (n > 0)
+ btr_add_output_pool(sit->btrp, n, sit->btrn);
+ if (ret >= 0)
+ return;