I've found a problem in the use of Xlib functions regarding re-entrancy. I
decided to implement an animated cursor (using 6 created cursors) by calling
XDefineCursor from a SIG_ALRM signal handler. This is used to indicate we are
waiting for a operator request to complete. (on a production control system).
I was redrawing the screen underneath the animated cursor and then restoring
the standard cursor when complete. I found dumped core , and upon analysis
it was when the SIG_ALRM handler was called during a XDrawString call. XDrawString
was doing a bcopy (presumably an internal structure) when the XDefineCursor
was called. Presumably the (internal) structure that XDrawString was manipulating
was not in a stable state and sent XDefineCursor to where it shouldn't have been.

Has anyone else experienced this? Is there any official documentation that
says you should ensure this doesn't happen? Or should bcopy() be atomic.
We are running on SGI Irix 4.0.1 with X11R4.



-- 
Regards, Martin