=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/ox_launch.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- OpenXM_contrib2/asir2000/io/ox_launch.c 2001/06/06 02:21:40 1.12 +++ OpenXM_contrib2/asir2000/io/ox_launch.c 2001/06/27 09:14:08 1.13 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM: OpenXM_contrib2/asir2000/io/ox_launch.c,v 1.11 2000/12/16 07:12:01 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/ox_launch.c,v 1.12 2001/06/06 02:21:40 noro Exp $ */ #include #include @@ -82,6 +82,7 @@ static int ox_io_init(int); static void push_one(Obj); static Obj pop_one(); static void do_cmd(int); +static void terminate_server(); static Obj *asir_OperandStack; static int asir_OperandStackPtr; @@ -184,6 +185,9 @@ char **argv; #if defined(SIGUSR1) signal(SIGUSR1,SIG_IGN); #endif +#if defined(SIGTERM) + signal(SIGTERM,terminate_server); +#endif if ( accept_client ) { cs = try_bind_listen(use_unix,control_port_str); @@ -408,5 +412,11 @@ static Obj pop_one() { if ( asir_OperandStackPtr >= 0 ) { return asir_OperandStack[asir_OperandStackPtr--]; } +} + +static void terminate_server() +{ + kill(cpid,SIGKILL); + exit(0); }