You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Niklas Edmundsson <ni...@acc.umu.se> on 2016/05/16 14:58:52 UTC

httpd and APR_HAS_XTHREAD_FILES

Hi!

I'm not sure if this really is a question for APR or httpd, but since 
I started digging into this from the httpd end first I'll start by 
asking here what to make of this.

Linux/Ubuntu 14.04LTS, httpd-2.4.20, APR as shipped in 
httpd-2.4.20-deps (1.5.2 AIUI).

I stumbled along the define APR_HAS_XTHREAD_FILES, and the more I 
poked arount the more confused I got. Are the flags 
APR_HAS_XTHREAD_FILES and APR_FOPEN_XTHREAD intended to be used in 
httpd as well? I suspect they are, since the apr-util file buckets 
might not really work as intended otherwise...

I can't find any clear docco on the intended use, but comments in 
apr-util/buckets/apr_buckets_file.c can be interpreted to mean that 
when APR_HAS_XTHREAD_FILES is true then fd:s can be shared across 
threads.

AFAIK, this is true for all Unix platforms, but APR_HAS_XTHREAD_FILES 
is false on my build.

Within httpd, APR_XTHREAD (the old name for APR_FOPEN_XTHREAD) only 
seems to be set in modules/arch/win32/mod_isapi.c and 
modules/cache/mod_file_cache.c.

My understanding is that the apr/apr-util code only acts if 
APR_FOPEN_XTHREAD is set, and since that's not the case in most places 
of httpd the XTHREAD code is mostly never triggered.

To be honest, I would have expected at least some XTHREAD presence in 
the event mpm, but perhaps it's assumed that the configure tests 
catches this?

In any case, I suspect that APR_HAS_XTHREAD_FILES really should be set 
to true on Unix builds. However, I'm guessing that this is purely an 
APR bug in that case?


/Nikke - confused now?
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |     nikke@acc.umu.se
---------------------------------------------------------------------------
  <----- The information went data way ----->
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=