On Wed, 2006-11-08 at 20:08 +0100, Rhythmic Fistman wrote: > > From: skaller <[EMAIL PROTECTED]>
> You can use sigwait to serialise/queue [some] incoming signals into > a nice waitable form, but to make it work reliably you need to set > the signal masks before any threads are spawned, i.e. before the felix > driver gets started. Yet another @#%#$@ API that just HAS to be run first. And this is wrong in principle. A signal is its own thread of control. By default it interrupts whatever thread is running, and that's what it should do. Note if there are multiple CPUs only one thread on one CPU will be interrupted. What should happen is a thread waiting on a signal should be rescheduled when the signal fires .. no matter which thread is running. Signal masks should be per-process, it should not matter which thread is interrupted. It's even messier in Unix if you spawn a process and wait for it. Now the signal can go to the child or the parent? No? Then how can you signal a process which is waiting? Clearly you have to release it .. which means every single OS blocking call could be released by a signal. Unix handles this woefully. The number of times I have tried to cancel the Felix config script with Ctrl-C and merely cancelled the child process (usually the C compiler doing some config check) and the parent just kept running. Yeah, you can check if the child died due to an error or was aborted by a signal .. but basically the whole concept is screwed up badly. This is what you get from a half-baked operating system design. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language