On Fri, Jun 04, 2004 at 02:31:48AM -0700, Justin Erenkrantz wrote: > I took a look at the locking problem, and I think it can be fixed > rather trivially. This is a minor problem in that it only affects the > case where the child doesn't share memory addresses - such as when > happens by using apr_proc_create. Hence, adding an 'apr_*_mutex_join' > could solve the problem.
But that model only works for fcntl and flock mutexes: the other three mechanisms on Unix (as currently implemented) simply cannot be used for synchronisation between processes which did not inherit a particular apr_proc_t structure. I think that we're looking for solutions to a non-problem here: the apr_proc_mutex interface is only useful on platforms with fork(). So let's surround the header with #if APR_HAS_FORK and be done with it? If you want to do portable synchronisation between two independent processes, you can use files and apr_file_lock(), right? joe