apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Vieiro <anto...@antonioshome.net>
Subject Re: apr_socket_close thread safe?
Date Tue, 13 Sep 2011 09:06:12 GMT

Thanks for the tip, but the fact is that I'm apr_socket_close *after* 
any apr_socket_recv, so the patch won't apply.

As far as I understand apr_socket_close cleans up the apr_pool_t, so any 
new incoming socket should be created in a brand new apr_pool_t (or 


El 12/09/11 09:50, Ignaz Birnstingl escribió:
> Antonio,
> from my experience calling apr_socket_close() on a socket where
> another thread is currently apr_socket_recv()'ing is not thread-safe.
> It is accidentally "safe" on most platforms but at least on Darwin
> this can lead to segfaults (caused by Darwin's curious implementation
> of the pollset API). I have a kind of hackish patch for APR if anyone
> needs it but I guess this should be addressed by someone who
> understands the API better than I do.

View raw message