Hello,
I ran into a bug in the "install-info" program, where the "dir" file is
opened with fopen(), and it was closed with pclose(). That's why
"install-info" hangs on the OS I use.
The path in the code is clear.
install-info/install-info.c:
910: f = open_possibly_compressed_file (...)
700: f = fopen (*opened_filename, FOPEN_RBIN);
# this might be executed, but won't make any difference
882: f = freopen (*opened_filename, "r", f);
888: return f;
939: pclose(f);
I was able to get this work with the attached patch file, based on the
comments and the code around it.
Please fix this issue.
Regards,
Aron
--- install-info.c.orig 2021-01-29 13:36:27.000000000 +0100
+++ install-info.c 2021-01-29 13:36:57.531524504 +0100
@@ -876,13 +876,13 @@
}
else
{
-#if O_BINARY
+/*#if O_BINARY*/
/* Since this is a text file, and we opened it in binary mode,
switch back to text mode. */
- f = freopen (*opened_filename, "r", f);
+ f = freopen (*opened_filename, "r", stdin);
if (! f)
return 0;
-#endif
+/*#endif*/
}
return f;