mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 22:29:16 +02:00
need to check for errno == EAGAIN in sexp_maybe_block_port
This commit is contained in:
parent
73d5083d10
commit
d29eea3780
1 changed files with 1 additions and 0 deletions
1
sexp.c
1
sexp.c
|
@ -1632,6 +1632,7 @@ int sexp_maybe_block_port (sexp ctx, sexp in, int forcep) {
|
||||||
if (sexp_port_flags(in) & O_NONBLOCK) {
|
if (sexp_port_flags(in) & O_NONBLOCK) {
|
||||||
if (!forcep
|
if (!forcep
|
||||||
&& (((c = sexp_read_char(ctx, in)) == EOF)
|
&& (((c = sexp_read_char(ctx, in)) == EOF)
|
||||||
|
&& (errno == EAGAIN)
|
||||||
&& sexp_opcodep((f=sexp_global(ctx, SEXP_G_THREADS_BLOCKER))))) {
|
&& sexp_opcodep((f=sexp_global(ctx, SEXP_G_THREADS_BLOCKER))))) {
|
||||||
((sexp_proc2)sexp_opcode_func(f))(ctx sexp_api_pass(f, 1), in);
|
((sexp_proc2)sexp_opcode_func(f))(ctx sexp_api_pass(f, 1), in);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue