sigblock(2) System Calls Manual sigblock(2)NAME
sigblock - Provides a compatibility interface to the sigprocmask function
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
int sigblock( int mask );
PARAMETERS
Specifies the signals to be added to the set of signals currently being blocked from delivery.
DESCRIPTION
The sigblock() function causes the signals specified by the mask parameter to be added to the set of signals currently being blocked from
delivery. The signals are blocked from delivery by logically ORing the mask parameter into the signal mask of the process. Signal i is
blocked if the i-th bit in the mask parameter is a value of 1. Only signals with values 1-31 can be masked with the sigblock() function.
NOTES
It is not possible to block SIGKILL. The system provides no indication of this restriction.
The sigblock() function is provided for compatibility to other UNIX systems. Its function is a subset of the sigprocmask() function.
RETURN VALUES
On completion, the previous set of masked signals is returned.
RELATED INFORMATION
Functions: kill(2), sigaction(2), sigpause(3), sigprocmask(2), sigsuspend(2), sigvec(2) delim off
sigblock(2)
Check Out this Related Man Page
SIGBLOCK(3) BSD Library Functions Manual SIGBLOCK(3)NAME
sigblock -- block signals
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <signal.h>
int
sigblock(int mask);
int
sigmask(signum);
DESCRIPTION
This interface is made obsolete by: sigprocmask(2).
sigblock() adds the signals specified in mask to the set of signals currently being blocked from delivery. Signals are blocked if the corre-
sponding bit in mask is a 1; the macro sigmask() is provided to construct the mask for a given signum.
It is not possible to block SIGKILL or SIGSTOP; this restriction is silently imposed by the system.
RETURN VALUES
The previous set of masked signals is returned.
EXAMPLES
The following example using sigblock():
int omask;
omask = sigblock(sigmask(SIGINT) | sigmask(SIGHUP));
Becomes:
sigset_t set, oset;
sigemptyset(&set);
sigaddset(&set, SIGINT);
sigaddset(&set, SIGHUP);
sigprocmask(SIG_BLOCK, &set, &oset);
Another use of sigblock() is to get the current set of masked signals without changing what is actually blocked. Instead of:
int set;
set = sigblock(0);
Use the following:
sigset_t set;
sigprocmask(SIG_BLOCK, NULL, &set);
SEE ALSO kill(2), sigaction(2), sigprocmask(2), sigsetmask(3), sigsetops(3)HISTORY
The sigblock() function call appeared in 4.2BSD and has been deprecated.
BSD August 10, 2002 BSD
Hi all,
I am a beginning UNIX user and am looking for a list of possible signals (with explanation) that can be used with the command kill.
Any input would be much appreciated.
Thanks.
Myriam (3 Replies)
Hi,
How do you write a function which has to stay blocked in a wait state till an event occurs?
The event could be the arrival of a message/updation of a database etc ..
Regards,
VJ (2 Replies)
I'm in highschool. They blocked my favorite site. How do I disable websense without getting caught on that particular webpage? Is it even possible? *twitch* I would also like to get as much UNIX for beginners information, so if someone might point me in the right direction so I don't have to read... (1 Reply)
Hello,
I would like to ask you for a little help with program I'm working on. I have problems with signals and synchronizing processes (I'm quite new to this part of programming).
Process "parent" creates new child process "child1" and this process creates new child process "child2". The... (2 Replies)
We know that a process can block certain signals by call sigprocmask(), but sometimes we may want to block signals from certain processes for safety concerning.
For example, a system may have a process management daemon, and it will response to certain signals from certain processes managed by... (4 Replies)
Too generic to post elsewhere, too advanced for the newbie forums. There are some applications within the unix/linux milieu that understand signals such as SIGHUP, etc as instructions to perform administrative tasks (clearing information out of this, disconnect users, etc.) I was just wondering if... (2 Replies)
Hi
Is there a way to add more user-defined signals?
I am currently using SIGUSR1 and SIGUSR2 - but I need another one.
How can I do that?
Thanks! (9 Replies)
Hi:
I have some old code need to be compiled - which include a system call, the function name is: sigblock like:
.....
int holdnum = sigblock(sigmask(SIGCHLD));
....
but the compiler told me the sigblock cannot be found even I include signal.h. Looks like it is depricated - but I need to... (1 Reply)
hi,
i have a function say "mask". i'm passing parameters to the function like file_name \$1 |.
inside the function i'm naming the second parameter as position (i.e value of position will be "$1").
i'm passing the position's value like " $position=a"
But it is nor picking the value "$1".... (5 Replies)
Dear All,
I am receiving Fixed blocked file from AS/400 system to my unix box. Could you please advise us how to convert this fix blocked file to variable blocked file. Do we have any command in Unixt or program.
I am new to this Unix system
Thanks & Regards,
Colam (1 Reply)
Hi folks!
I have been reading Vahalia's Unix Internals book, which states the following in the chapter dedicated to signals:
Given that, my understanding is that processes running in user mode don't become aware of signals until they switch to kernel mode, where the issig() function is called... (3 Replies)