Subject: Re: ksh lossage on sparc64
To: matthew green <email@example.com>
From: Martin Husemann <firstname.lastname@example.org>
Date: 11/20/2000 15:59:10
> this happens with other ports? how is the ksh source broken? i don't see
> why it needs the volatile casts anyway...
I suppose it happens for any ports where gcc has enough registers to hold
the last value for j->state. This value is changed inside the SIGCHLD
handler, and this is the loop that needs to terminate after that handler
What now happens on sparc64 is: the sigchld function modifies the struct
pointed to by "j" in this loop, returns, thus waking up the sigsuspend a
few lines below, continues to the "while" check and still has the old value
of j->state in a register, checks against that and continues the loop one
more time - thus blocking in "sigsuspend" again.