home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
CMDS
/
mtools_3.6.src.lzh
/
MTOOLS_3.6
/
signal.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-11-12
|
529b
|
31 lines
#include "sysincludes.h"
#include "mtools.h"
#ifdef _OSK
#include <signal.h>
#endif
int got_signal = 0;
void signal_handler(int dummy)
{
got_signal = 1;
signal(SIGHUP, SIG_IGN);
signal(SIGINT, SIG_IGN);
#ifndef _OSK
signal(SIGTERM, SIG_IGN);
#endif
signal(SIGQUIT, SIG_IGN);
}
void setup_signal(void)
{
/* catch signals */
signal(SIGHUP, (SIG_CAST)signal_handler);
signal(SIGINT, (SIG_CAST)signal_handler);
#ifndef _OSK
signal(SIGTERM, (SIG_CAST)signal_handler);
#endif
signal(SIGQUIT, (SIG_CAST)signal_handler);
}