mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 22:59:16 +02:00
open-input-file creates non-blocking ports
This commit is contained in:
parent
d29eea3780
commit
c114357859
1 changed files with 3 additions and 0 deletions
3
eval.c
3
eval.c
|
@ -916,6 +916,9 @@ sexp sexp_open_input_file_op (sexp ctx sexp_api_params(self, n), sexp path) {
|
||||||
in = fopen(sexp_string_data(path), "r");
|
in = fopen(sexp_string_data(path), "r");
|
||||||
if (! in)
|
if (! in)
|
||||||
return sexp_user_exception(ctx, self, "couldn't open input file", path);
|
return sexp_user_exception(ctx, self, "couldn't open input file", path);
|
||||||
|
#if SEXP_USE_GREEN_THREADS
|
||||||
|
fcntl(fileno(in), F_SETFL, O_NONBLOCK);
|
||||||
|
#endif
|
||||||
return sexp_make_input_port(ctx, in, path);
|
return sexp_make_input_port(ctx, in, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue