Commit ec021eea ec021eeafb34d28da185a9fe1567f6028a0a934f by Alain Magloire

sigh ... use fdopen to open the file not fopen, was opening the file twice

no arm but may run out of file descriptors.
1 parent 5b80ef58
......@@ -299,7 +299,7 @@ _file_open (stream_t stream, const char *filename, int port, int flags)
else /* Default readonly. */
mode = "rb";
fs->file = fopen (filename, mode);
fs->file = fdopen (fd, mode);
if (fs->file == NULL)
{
int ret = errno;
......