Bojan Smojver wrote:
Now, the first thread, the one using APR file, in the signal handler
that interrupted it, calls apr_file_os_get() on that file. It gets back
the FD from the second thread! That is a problem that no locking of APR
file can solve. Any action on this FD will do things to the file from
the second thread, not from this one (because it's already closed).

But, by setting file->filedes to -1 before the close(), we can at least
mitigate the consequences of such a situation.


Ok, I got your point. It is not a threading issue. Its a signal handler issue. For that purpose your proposal works just fine.

Stefan

Reply via email to