init ems server code

This commit is contained in:
2024-09-27 15:39:34 +08:00
parent 9d4009aaca
commit 9930e4e58f
1551 changed files with 110216 additions and 102864 deletions

33
plat/iptrans/src/signal.c Normal file
View File

@@ -0,0 +1,33 @@
/*
** PACS-WLL 2000 project, Prepaid System.
**
** The module Copyright (C) 2000-2001 interWAVE Inc.
**
** Written completely by Zhang Shuzhong at iCRD January, 2001
**
** module name: signal.c
** CVS $Id: signal.c,v 1.2 2001/01/11 04:07:56 zhangsz Exp $
**
** Signal functions
**
*/
#include "./include/iptrans.h"
/*
** Set termination signal in a loop program,
** handler of function mostly deal with something,
** e.g. closing file handler, socket handler or free allocatied memory.
*/
/*@ignore@*/
void
SetTermSignal(struct termio *ptermio, void (*handler)(int))
{
ioctl(0, TCGETA, ptermio);
ptermio->c_cc[VINTR] = '\x03';
ioctl(0, TCSETA, ptermio);
signal(SIGINT, handler);
signal(SIGTERM, handler);
}
/*@end@*/