Thread View: comp.bugs.sys5
1 messages
1 total messages
Started by Richard Stevens
Wed, 26 Oct 1988 11:36
grap bug (DWB 2.0) + FIX
Author: Richard Stevens
Date: Wed, 26 Oct 1988 11:36
Date: Wed, 26 Oct 1988 11:36
32 lines
1301 bytes
1301 bytes
Index: grap.d/print.c - Documenter's Workbench, 2.0
Description:
Grap isn't closing all its files. Specifically, for every
"copy thru" that it encounters, it opens its temporary file
twice, but only closes it once.
Repeat-By:
Create a file with a lot of "copy thru". On 4.3 BSD (which allows
64 open files per process) grap died on about the 60'th copy
thru file.
Fix:
The function reset() is being called twice, causing the tempfile
to be opened twice. The following patch corrects the problem.
RCS file: RCS/print.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -r1.1 -r1.2
209,211c209,215
< if (tfd != stdout && (tfd = fopen(tempfile, "w")) == NULL) {
< fprintf(stderr, "grap: can't open %s\n", tempfile);
< exit(1);
---
> if (tfd != stdout) {
> if (tfd != NULL)
> fclose(tfd);
> if ((tfd = fopen(tempfile, "w")) == NULL) {
> fprintf(stderr, "grap: can't open %s\n", tempfile);
> exit(1);
> }
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads