Don't close Unix's stdio handles when unloading doscalls library.

This commit is contained in:
Ryan C. Gordon committed 2018-01-19 19:12:40 -05:00
1 parent 644d0558bd
commit 84e1191db9
1 file changed
+1 -1
+1 -1
View File
@@ -2926,7 +2926,7 @@ LX_NATIVE_MODULE_DEINIT({
} // for
for (uint32 i = 0; i < MaxHFiles; i++) {
if (HFiles[i].fd != -1)
if (HFiles[i].fd > 2) // don't close -1, or any stdio handles.
close(HFiles[i].fd);
} // for
free(HFiles);