The behavior of the call is dependent on the value of how, as follows. If set is a null pointer, the set of blocked signals is not changed. Since a few days i saw the puppet client running very slow. If sigprocmask fails, the signal mask of the thread is not changed. Sigprocmask2 linux programmers manual sigprocmask2. The signal mask is the set of signals whose delivery is currently blocked for the caller see also signal7 for more details. Examples kill 2 1234 kill sigint 1234 o same as pressing ctrlc if process 1234 is running in. To query the current signal mask without changing it, specify. The sigprocmask function is used to examine or change or.
The signal mask is managed by the sigprocmask function and also by the ztpf system. The prototype for the sigprocmask function is in signal. The use of the sigthstop and sigthcont signal is not supported with this function. Note that you must not use sigprocmask in multithreaded processes, because each thread has its own. Please explain with an example, to block, say sigusr1 for a few seconds and then unblock and handle it. This example demonstrates how to block signals using sigprocmask. Use the l c option to qcc to link against this library. The sigprocmask function is intended only for use in a singlethreaded process. The following example shows how to block all signals. A beginners tutorial containing complete knowledge of unix korn and bourne shell and programming, utilities, file system, directories, memory management, special variables, vi editor, processes. Linux programming this program blocks sigterm signal for 10 seconds using sigprocmask 2 after that the signal is unblocked and the queued signal is handled.
800 751 997 563 1443 1050 1173 910 1315 1042 669 204 1006 746 97 439 1114 962 1183 1151 1231 81 1118 644 794 341 913 841 1132 660 241 479 1171 499 1024 512 561 747 1209 339 938 1485 298 1106 537