Internal editor opens files twice on load
Pavel Roskin
proski at gnu.org
Fri Dec 20 20:08:56 UTC 2002
Hello!
There is a race condition in the internal editor. When the editor opens a
file, the file is opened to check its permissions, then closed and then
opened again, either for fast loading directly into the buffers, or (if
the file size is unknown) for loading byte-by-byte.
I have mostly implemented a different solution, when the file is opened
only once. The biggest problem is with the filters. The filters are used
for compressed files to compress and decompress them on the fly. The
problem is that the existing filters are designed to be run by a subshell,
while I need to run mc_doublepopen() so that the filter would get the date
from an already opened file. mc_doublepopen() needs parsed command line.
This patch has "gzip" hardcoded for the filters. I think that the final
patch is going to be too intrusive for the next release, so I put it to
the bug tracking system:
https://savannah.gnu.org/bugs/?func=detailbug&bug_id=2032&group_id=3521
If anybody is interested, please have a look and leave your comments.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list