Solaris torturethread problem?

I just compiled SDL 1.1 cvs on a Solaris 8 Sparc box and tried running
the torturethread program. It blocks in thread creation. After some
investigation it seems like the reason is that sem_post is called
before sem_wait. Thus, I believe (correct me if I’m wrong), sem_wait
never returns. In any case, it does work if I disable the use of
semaphores in the thread creation process.

Now, the question is - why use the semaphores at all? What I did is to
simply free(args) in the end of RunThread (right before running the
thread in question) and also free it if the thread creation fails.

Is there a reason not to do it this way that I’m not thinking about?–
[ Below is a random fortune, which is unrelated to the above message. ]
A soft answer turneth away wrath; but grievous words stir up anger.
– Proverbs 15:1