Click to See Complete Forum and Search --> : signals in windows


svenhag
February 11th, 2005, 09:23 AM
Hi

I'd like to know if windows have anything like posix signals. There ought to be something that is similar and as easy to use as kill(pid, sig). If there isn't, then what's the easiest way to tell a process that a special event has occured?

NoHero
February 11th, 2005, 09:53 AM
In windows we call signal able objects "Events" they are created by using CreateEvent(); set via SetEvent(); reset via ResetEvent(); and you can wait for them to be signaled by using WaitForSingleObject(). Just look these functions up in the MSDN.

Marc G
February 20th, 2005, 04:15 AM
There is an interesting article in the MSDN about Unix signals:
UNIX Code Migration Guide: Chapter 9: Win32 Code Conversion: Signals and Signal Handling (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnucmg/html/UCMGch09.asp)