#379 closed defect (fixed)
psTrace fails to handle new file pointers correctly
| Reported by: | eugene | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | sys | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
There are two related problems here.
1) traceFP is defined static and set initially to NULL. Throughout the code,
wherever there is a use of traceFP, it it tested, and if NULL, printf statements
are used, otherwise fprintf statements are used. This leads to both code that
is hard to read, and also possible inconsistencies depending on the device
2) the function psTraceSetDestination was leaving the last value of traceFP open
and inaccesible. It was not closing it, nor was it testing for it to be closeable.
I have fixed both of these issues, and am attaching the updated code
Attachments (2)
Change History (4)
by , 21 years ago
comment:1 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
files taken pretty much as is and folded into CVS.
comment:2 by , 21 years ago
N.B., the only change was to make the default destination stdout, not stderr, as
required by the SDRS.

psTrace.c with fixes for psTraceSetDestination, NULL tests