Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




24.10.1 BSD Function to Establish a Handler

— Data Type: struct sigvec

This data type is the BSD equivalent of struct sigaction (see Advanced Signal Handling); it is used to specify signal actions to the sigvec function. It contains the following members:

sighandler_t sv_handler
This is the handler function.
int sv_mask
This is the mask of additional signals to be blocked while the handler function is being called.
int sv_flags
This is a bit mask used to specify various flags which affect the behavior of the signal. You can also refer to this field as sv_onstack.

These symbolic constants can be used to provide values for the sv_flags field of a sigvec structure. This field is a bit mask value, so you bitwise-OR the flags of interest to you together.

— Macro: int SV_ONSTACK

If this bit is set in the sv_flags field of a sigvec structure, it means to use the signal stack when delivering the signal.

— Macro: int SV_INTERRUPT

If this bit is set in the sv_flags field of a sigvec structure, it means that system calls interrupted by this kind of signal should not be restarted if the handler returns; instead, the system calls should return with a EINTR error status. See Interrupted Primitives.

— Macro: int SV_RESETHAND

If this bit is set in the sv_flags field of a sigvec structure, it means to reset the action for the signal back to SIG_DFL when the signal is received.

— Function: int sigvec (int signum, const struct sigvec *action,struct sigvec *old-action)

This function is the equivalent of sigaction (see Advanced Signal Handling); it installs the action action for the signal signum, returning information about the previous action in effect for that signal in old-action.

— Function: int siginterrupt (int signum, int failflag)

This function specifies which approach to use when certain primitives are interrupted by handling signal signum. If failflag is false, signal signum restarts primitives. If failflag is true, handling signum causes these primitives to fail with error code EINTR. See Interrupted Primitives.

  Published under the terms of the GNU General Public License Design by Interspire