From: George H. <fr...@di...> - 2004-10-18 21:46:23
|
Hi, Following on from my cookie problem last week, I'm now seeing other failures caused by one thread updating the env() array while another thread is using it. In particular, I get an occasional 'no such variable' error while reading an env entry even though the code explicitly checks that it exists before using it. This is most likely because Cgi_SetEnvAll unsets most of the array before re-populating it from the socket data. It isn't just my code that breaks, the env array is also used by some of the standard library modules and I caught one failure when msgcat couldn't read env(LANG). I can see solutions for some of these issues, for example adding LANG to the 'env-pass' list should prevent it from being unset and I can access the CGI data directly from the socket data, but I was just wondering if there is a more general solution to accessing env() data in a threaded environment. Regards, George |