samba shares access issue in Solaris from a MT program
David Collier-Brown
davec-b at rogers.com
Fri Sep 24 17:18:07 GMT 2004
On Fri, 24 Sep 2004, Narayana Pattipati wrote:
> [Nice description of problem redacted.]
>
>
>>If samba is build with "-mt" flags, then the errno will be pointed
>>to __errno() macro, instead of global errno, and thread executing samba
>>code will be able to access correct errno.
>>
>>I have few open questions based on this:
>>a) I read from samba site that its not MT safe. But since the code runs in
>> one thread only, is it OK to build samba with "-mt" compiler flags ?
>> What would be the side effects if samba is build with -mt compiler
>> flags ?
Richard Sharpe wrote:D>
> I cannot see any problems with this, off my head.
From my experience with the compiler/linkers
on Sun, the only substantiative change is the
use of a thread-aware errno mechanism. If the
program is unthreaded, the errno will work
normally even with -mt specified.
Of course, it is the responsibility of the
caller to protect the library against concurrent
calls via locking, but that and -mt are what
we've used in the past to make non-thread-safe
libraries usable.
I'd like to suggest that the configure script
be changed to add -mt to the solaris linker
options for Solaris (only).
--dave
ps: would you like this submitted via bugzilla,for your records?
--
David Collier-Brown, | Always do right. This will gratify
davecb at spamcop.net | some people and astonish the rest
| -- Mark Twain
More information about the samba-technical
mailing list