diff options
-rw-r--r-- | converter/other/pnmtops.c | 7 | ||||
-rw-r--r-- | doc/HISTORY | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c index 6c83f38e..5e7d1563 100644 --- a/converter/other/pnmtops.c +++ b/converter/other/pnmtops.c @@ -2036,6 +2036,13 @@ main(int argc, const char * argv[]) { name = strdup("noname"); else name = basebasename(cmdline.inputFileName); + + /* This program manages file descriptors in a way that assumes + that new files will get file descriptor numbers less than 10, + so we close superfluous files now to make sure that's true. + */ + closeAllBut(fileno(ifP), fileno(stdout), fileno(stdout)); + { int eof; /* There are no more images in the input file */ unsigned int imageSeq; diff --git a/doc/HISTORY b/doc/HISTORY index 6b298ec9..08c705b0 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -9,6 +9,8 @@ not yet BJH Release 10.65.00 Recognize SIGPWR on systems that have it in messages about signal received. + Fix bug: program hangs if it inherits lots of open files. + Build for big-endian machines: fix syntax error so it compiles. Broken in 10.63 (June 2013). |