Print

Print


Hi Pete,
	As far as I can tell, this can only be turned on via by calling XrdClientEnv::Put() which as far as I can tell appears to be impossible to do at the right time. The moment libXrdClient.so enters the job the static initializer is constructed and in its constructor it checks the environment variable and sets or does not set the fork handling based on what ever value XrdClientEnv has at that time. Since one would have to link with libXrdClient.so in order to be able to call XrdClientEnv::Put() I don't see how we can call 'Put' before the library gets loaded and the fork handler is already set.

	What am I missing?
		Chris
 
Christopher Jones
Fermi National Accelerator Laboratory
[log in to unmask]

On Mar 3, 2011, at 7:51 AM, Peter Elmer wrote:

>  Hi Lukasz,
> 
> On Thu, Mar 03, 2011 at 02:13:19PM +0100, Lukasz Janyst wrote:
>>   I have been already contacted by Brian about this issue. This is
>> one of the reasons why the final version of the patch that has made it
>> to the xroot repository is sligthly different that the one you got:
>> the fork handlers are disabled by default and one can enable them by
>> setting an environment flag:
>> 
>>   http://xrootd.cern.ch/cgi-bin/cgit.cgi/xrootd/patch/?id=953079e8605f58f0500e6b4ed774a8ed91a75671
>> 
>>   I can also add the check suggested by Chris just to be extra careful.
> 
>  Ok, it looks like the environment for this fix is something we can turn
> on programmatically (and not via an envvar, which we don't use for 
> configuration), is that correct? What is the reason for making it disabled
> by default? Is there a penalty for using it in the non-fork cases or is
> this just "caution" because it is a new/experimental feature?
> 
>  Brian, can you look to see if we should move to an updated patch? (Based
> on the final version above plus Chris patch if Lukasz thinks it is still
> worth adding it.)
> 
>                                 thanks,
>                                   Pete
> 
> -------------------------------------------------------------------------
> Peter Elmer     E-mail: [log in to unmask]      Phone: +41 (22) 767-4644
> Address: CERN Division PPE, Bat. 32 2C-14, CH-1211 Geneva 23, Switzerland
> -------------------------------------------------------------------------