Unix to Windows Porting Dictionary for HPC |
|
|
RSS
LinksFunction List
|
Table of Contents The POSIX implementation of signals includes the ability to mask individual signals. A signal mask is maintained by the operating system for each process in the system. The sigemptyset routine allows the user to conveniently set up a mask set so it can be applied to the system copy with a single call (sigprocmask()). This mask set will exclude all signals from execution. The Windows implementation of signals does not include a mask capability at the process level. To get around this limitation the user can implement masking in the handler itself after setting the handler up to accept all signals. Once the handler is invoked, it can inspect the number of the signal that has invoked it and decide whether to ignore it, process it or send it off to the default handler for that signal. To simulate the sigemptyset() call in the running example you would set all of the actions in the signalmask array to either SIG_DFL or USER depending on your needs. In essence all of the signals will be accepted after this call is made. |
|
|
|