Browse Source
On first close, we set the file pointer to 0 to indicate that it is not valid anymore. As PrismLog implements Close/AutoCloseable, multiple close calls have to be supported. Before, calling close multiple times could result in double free crashes on Linux (seen in development branches, not master). We also check that we don't write on a closed FILE pointer, but raise an exception instead. Here, we use a RuntimeException (IllegalStateException) instead of a PrismException as changing the PrismLog interface would be quite disruptive to the rest of the code.master
committed by
Dave Parker
2 changed files with 15 additions and 0 deletions
Loading…
Reference in new issue