forked from OpenSC/OpenSC
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: fix segfault with verbose log into 'stderr'
Issue OpenSC#824 In Windows, file handles (including 'stderr', 'stdout') can not be shared between DLL-s, and so, the log handle (File *), defined in one module, cannot be reused in another. That is the situation when, for example, the SM is processed in external, dynamically loadable module as it currently implemented for IAS/ECC card. That's for the configuration option 're-open of log file on each message' was introduced. This 're-open' logic has not been tested in the particular case of opensc-* tools used with verbose log into 'stderr' -- in dynamically loaded module the 'stderr' handle, defined in the 'main' module, was not recognized as 'stderr' and there was an attempt to close it.
- Loading branch information
1 parent
3cb24eb
commit 4ad5d1f
Showing
4 changed files
with
34 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters