"Lex Spoon" lex@cc.gatech.edu wrote: [SNIP]
Okay, Ian has patiently explained to me how the semaphore notification stuff is supposed to work, and it turns out that the SourceForge code is really a mess. Basically, the following line in notify():
int mask= pss->pendingEvents | eventMask;
would cause all events to be signalled that the image is interested in, whether the event has happened or not. Changing the "|" to the proper "&" (duh!) causes many events *not* to be signalled. This led to a cascade of changes to make sure that pendingEvents has all the flags it is supposed to, and that select() gets called on all the events listed in pendingEvents. This is all posted on SourceForge now.
Super! I am rebuilding as we speak.
Goran's example code works properly, Scamper works, and with any luck email sending works. :) Hopefully this is better on the whole, but there may well be new problems. It's tricky stuff, and the code is less than clear.
The changes are posted on SourceForge. I haven't looked at Ian's version, but there's a good chance that it has similar issues.
Yes - the "|" bug was in his original code. He sent a patch to the list with the "|"->"&" change plus others. Did you check it?
Lex Spoon
regards, Göran
squeak-dev@lists.squeakfoundation.org