summaryrefslogtreecommitdiffstats
path: root/lem/io/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'lem/io/core.c')
-rw-r--r--lem/io/core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lem/io/core.c b/lem/io/core.c
index 15ebd8d..c56463c 100644
--- a/lem/io/core.c
+++ b/lem/io/core.c
@@ -255,12 +255,11 @@ push_stdstream(lua_State *L, int fd)
struct stream *s;
/* make the socket non-blocking */
- if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
- luaL_error(L, "error making fd %d non-blocking: %s",
- fd, strerror(errno));
+ fcntl(fd, F_SETFL, O_NONBLOCK);
s = stream_new(L, fd, -2);
- s->open = 2; /* don't close this in __gc() */
+ /* don't close this in __gc(), but make it blocking again */
+ s->open = 2;
}
int