File: sigig_lin.c

package info (click to toggle)
clif 0.92-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,580 kB
  • ctags: 2,814
  • sloc: ansic: 31,040; yacc: 4,961; lex: 659; makefile: 390; sh: 60
file content (28 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * sigig_lin.c
 *
 * Ignores interrupts in a fork-ed process.
 * It is used from rw.c file.
 */

#include <bsd/signal.h>


struct sigvec vec_fork, ovec_fork;

#ifndef PROTO
#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__)
#define PROTO(ARGS) ARGS
#else
#define PROTO(ARGS) ()
#endif 
#endif

void mysigignore PROTO((void));

void 
mysigignore ()
{
  vec_fork.sv_handler = SIG_IGN;
  sigvec (SIGINT, &vec_fork, &ovec_fork);
}