projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
074b5df
)
libs/nixio: don't close stdin, stdout or stderr during garbage collection
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 19 Jul 2009 02:39:10 +0000
(
02:39
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 19 Jul 2009 02:39:10 +0000
(
02:39
+0000)
libs/nixio/src/file.c
patch
|
blob
|
history
diff --git
a/libs/nixio/src/file.c
b/libs/nixio/src/file.c
index 70c717e4e17e62ca8bcce6899ecf0d012d724a09..9f99fb8277c334d39b679c949ea78591b093b113 100644
(file)
--- a/
libs/nixio/src/file.c
+++ b/
libs/nixio/src/file.c
@@
-329,7
+329,7
@@
static int nixio_file_close(lua_State *L) {
static int nixio_file__gc(lua_State *L) {
int *fdp = luaL_checkudata(L, 1, NIXIO_FILE_META);
int res;
- if (*fdp
!= -1
) {
+ if (*fdp
> 2
) {
do {
res = close(*fdp);
} while (res == -1 && errno == EINTR);