summaryrefslogtreecommitdiff
path: root/src/signal/sigrelse.c
blob: 31c1a030fe52708925cdb8fe96a227ff1537210b (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <signal.h>
#include <stddef.h>

int sigrelse(int sig)
{
	sigset_t mask;

	sigemptyset(&mask);
	if (sigaddset(&mask, sig) < 0) return -1;
	return sigprocmask(SIG_UNBLOCK, &mask, NULL);
}