Also, I have a question about how clone() works in re to the stack. It
would appear, from my initial testing of it, that the stack is marked as
copy-on-write for each clone()'ed process.
This would seem to me to be a problem should you, say, pass a pointer to
something on the stack to a thread. Say, for example, that main()
defines a C++ object on the stack and sets a global pointer to it.
Unfortunately, each thread will have a separate copy of the object, which
is kinda icky when thats not what most people expect. It isnt what Win32
(ick!) threading, nor Java's green threads nor pthreads does. I dont
have my Solaris machine, so I cant check that yet.
Any way to get around this?
Thanks!
--randy