Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "lib.h"
2
#include <signal.h>
3
#include <errno.h>
4
 
5
sigset_t _psigblocked;
6
 
7
int
8
sigprocmask(int how, sigset_t *set, sigset_t *oset)
9
{
10
	if(oset)
11
		*oset = _psigblocked;
12
	if(how==SIG_BLOCK)
13
		_psigblocked |= *set;
14
	else if(how==SIG_UNBLOCK)
15
		_psigblocked &= ~*set;
16
	else if(how==SIG_SETMASK)
17
		_psigblocked = *set;
18
	else{
19
		errno = EINVAL;
20
		return -1;
21
	}
22
	return 0;
23
}