Re: Open files leakage
- From: "Andrew V. Samoilov" <sav it efp com ua>
- To: Bj?rn Eriksson <bjorn bjornen nu>
- Cc: Andrey Panov <pav metib ru>, mc-devel gnome org
- Subject: Re: Open files leakage
- Date: Wed, 15 May 2002 17:57:17 +0300
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]