Hi ,
I have a multithreaded prog , spwanning treads which make use of a OUT stream.
With multiple threads , trying to access the OUT stream , I got a crash , while trying to fclose the OUT stream .
Is there a way I can check if the OUT stream is being used ?
Tried fcntl to set a waiting lock , but that does not seem to work for threads within the process.
Thanks for your reply :)
Sync with mutex might not be possible as the stream is called at a lot of places .
While browsing I came across a thread safe lock function flockfile() this creates a blocking lock on the FILE stream . Will try this out now ...