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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

Previous: BSD Handler, Up: BSD Signal Handling


24.10.2 BSD Functions for Blocking Signals

— Macro: int sigmask (int signum)

This macro returns a signal mask that has the bit for signal signum set. You can bitwise-OR the results of several calls to sigmask together to specify more than one signal. For example,

          (sigmask (SIGTSTP) | sigmask (SIGSTOP)
           | sigmask (SIGTTIN) | sigmask (SIGTTOU))
     

specifies a mask that includes all the job-control stop signals.

— Function: int sigblock (int mask)

This function is equivalent to sigprocmask (see Process Signal Mask) with a how argument of SIG_BLOCK: it adds the signals specified by mask to the calling process's set of blocked signals. The return value is the previous set of blocked signals.

— Function: int sigsetmask (int mask)

This function equivalent to sigprocmask (see Process Signal Mask) with a how argument of SIG_SETMASK: it sets the calling process's signal mask to mask. The return value is the previous set of blocked signals.

— Function: int sigpause (int mask)

This function is the equivalent of sigsuspend (see Waiting for a Signal): it sets the calling process's signal mask to mask, and waits for a signal to arrive. On return the previous set of blocked signals is restored.


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