From c114357859e8b28f8570c7f0ccf28c3b7577fddb Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 11 Dec 2010 22:37:41 -0800 Subject: [PATCH] open-input-file creates non-blocking ports --- eval.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eval.c b/eval.c index d4e06c88..cc54a59b 100644 --- a/eval.c +++ b/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"); if (! in) 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); }