rlm_perl CLONE/thread identification ?

Jakub Wartak vnulllists at pcnet.com.pl
Sun Oct 8 16:38:00 CEST 2006


Hello group,

I tried using "use threads" and quering by simple: my $id = threads->tid;
But it always returns 0 ( meaning that the perl code is running under main() 
program ), but how do I identifiy each CLONE ?? I want to obtain unique 
identified of each CLONE, because the goal is to create DB connection for 
each CLONE for performance reasons, the DBI object/handle AFAIK shouldn't be 
shared.

Maybe enumerating in sub CLONE() ?? Is this launching CLONE of perl module 
serialized ? And I could fetch current running CLONE id from authorize () ?

wiki.freeradius.org states ( about CLONE() ):
"In this function you can initialize some variables that should be local for 
this thread. For example an Database connection."


-- 
Jakub Wartak
-vnull
http://vnull.pcnet.com.pl/



More information about the Freeradius-Users mailing list