mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-12 23:47:34 +02:00
forgot to call clearerr after ferror
This commit is contained in:
parent
da2795cfa5
commit
bab0541548
1 changed files with 1 additions and 0 deletions
1
sexp.c
1
sexp.c
|
@ -2091,6 +2091,7 @@ int sexp_maybe_block_port (sexp ctx, sexp in, int forcep) {
|
||||||
&& (((c = sexp_read_char(ctx, in)) == EOF)
|
&& (((c = sexp_read_char(ctx, in)) == EOF)
|
||||||
&& sexp_port_stream(in)
|
&& sexp_port_stream(in)
|
||||||
&& ferror(sexp_port_stream(in)) && (errno == EAGAIN))) {
|
&& ferror(sexp_port_stream(in)) && (errno == EAGAIN))) {
|
||||||
|
clearerr(sexp_port_stream(in));
|
||||||
f = sexp_global(ctx, SEXP_G_THREADS_BLOCKER);
|
f = sexp_global(ctx, SEXP_G_THREADS_BLOCKER);
|
||||||
if (sexp_opcodep(f)) {
|
if (sexp_opcodep(f)) {
|
||||||
((sexp_proc2)sexp_opcode_func(f))(ctx, f, 1, in);
|
((sexp_proc2)sexp_opcode_func(f))(ctx, f, 1, in);
|
||||||
|
|
Loading…
Add table
Reference in a new issue