Unix to Windows Porting Dictionary for HPC

RSS

Links

Function List

sigignore


Unix

header file: signal.h

int sigignore(int sig);

Windows

Header file: none

Purpose

The sigignore call will set the disposition of the signal to ignore for the calling process.

Discussion

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 sigignore routine sets the disposition of the specified signal to ignore in the system mask for the calling process.

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.

The implementation of the sigignore() call in the running example would simply set the appropriate signal value to SIG_IGN in the sigmask array.

blog comments powered by Disqus
Valid HTML 4.01 Transitional Valid CSS!