Tom Mueller wrote:
Bart,
The use of the global variable in the os_unix.py file would seem to
introduce a potential concurrency issue if multiple threads are using
this code. Consider the case where separate threads are operating on
separate user images simultaneously. Currently, the pkg(5) code handles
this, but with this fix, there could be a problem with accessing the
__been_here dictionary.
Instead of checking on every call, can't the module just call the
offending get group name method once as it is loaded? And maybe that
call should be in os_sunos.py rather than os_unix.py is that it is only
done for Solaris?
This is a temporary work around; the fix is destined for libc soon.
What happens in the multi-threaded case is out of scope right now;
we don't have a MT client or any test cases for one. I think the
initialization would need to be done per thread.
Do you folks have a MT front end that's using pkg(5) code?
- Bart
--
Bart Smaalders Solaris Kernel Performance
[email protected] http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss