Michel Bardiaux
2006-05-17 09:06:20 UTC
I use wrapper structs around FILE*. These structs have a finalizer
(called by my own garbage collector). The finalizer has to call fclose.
*BUT* if the FILE* comes from a popen, it should be pclose.
Unfortunately I was not able to find a way of knowing whether a FILE*
comes from an fopen or popen. Is there one or do I need my own flag?
TIA,
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:***@mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
(called by my own garbage collector). The finalizer has to call fclose.
*BUT* if the FILE* comes from a popen, it should be pclose.
Unfortunately I was not able to find a way of knowing whether a FILE*
comes from an fopen or popen. Is there one or do I need my own flag?
TIA,
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:***@mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/