File: mcommon.c

package info (click to toggle)
procmail 3.22-25+deb9u1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,116 kB
  • sloc: ansic: 9,885; sh: 1,957; makefile: 136
file content (29 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (21)
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
29
/************************************************************************
 *	Some common routines to all programs but formail		*
 *									*
 *	Copyright (c) 1993-1997, S.R. van den Berg, The Netherlands	*
 *	#include "../README"						*
 ************************************************************************/
#ifdef RCS
static /*const*/char rcsid[]=
 "$Id: mcommon.c,v 1.5 1997/04/03 01:58:45 srb Exp $";
#endif
#include "includes.h"
#include "mcommon.h"

static volatile int gotsig;

static void fakehandler P((void))
{ gotsig=1;
}

void qsignal(sig,action)const int sig;void(*action)P((void));
{ gotsig=0;
  if(SIG_IGN==signal(sig,(void(*)())fakehandler))
     signal(sig,SIG_IGN);
  else
   { signal(sig,(void(*)())action);
     if(gotsig)
	(*action)();
   }
}