summaryrefslogtreecommitdiff
path: root/src/libstddjb/sig_restoreto.c
blob: 580ba32a565c96e3283963d2137d310354fcd47b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* ISC license. */

/* MT-unsafe */

#include <signal.h>
#include <skalibs/sig.h>

void sig_restoreto (sigset_t const *set, unsigned int n)
{
  unsigned int i = 1 ;
  for (; i <= n ; i++)
  {
    int h = sigismember(set, i) ;
    if (h < 0) continue ;
    if (h) sig_restore(i) ;
  }
}