Open files leakage
Andrew V. Samoilov
sav at it.efp.com.ua
Wed May 15 14:57:17 UTC 2002
Hi!
> I couldn't reproduce this with 4.5.55 but the cvs version exhibits said
> problem. After ~100 Views on src/regex.o I get:
>
> >> Internal error: No more virtual file handles <<
>
> I've looked around for a while. I think it might be due to recent
> changes to view.c (vfs.c:mc_close() is never called) but haven't found
> the bug yet. [I'll look some more tonight.]
I found and fixed this bug.
Patch attached and commited to CVS tree.
--- src/view.c Tue Mar 19 08:08:38 2002
+++ src/view.c Wed May 15 17:44:12 2002
@@ -569,9 +569,11 @@ do_view_init (WView *view, char *_comman
}
}
- if (_command && (view->viewer_magic_flag || _file[0] == '\0'))
+ if (_command && (view->viewer_magic_flag || _file[0] == '\0')) {
error = init_growing_view (view, _command, view->filename);
- else
+
if (fd != -1)
+
mc_close (fd);
+ } else
error = load_view_file (view, fd);
finish:
--
Regards,
Andrew V. Samoilov.
More information about the mc-devel
mailing list