--- multiplexer/init.c 2003/08/25 21:05:23 1.6 +++ multiplexer/init.c 2004/06/17 22:04:07 1.7 @@ -1,7 +1,7 @@ /* * ISO 13818 stream multiplexer * Copyright (C) 2001 Convergence Integrated Media GmbH Berlin - * Author: Oskar Schirmer (oskar@scara.com) + * Author: Oskar Schirmer (schirmer@scara.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ * Purpose: Initialization and start the dispatcher loop. */ +#include #include "global.h" #include "crc.h" #include "error.h" @@ -32,10 +33,22 @@ #include "command.h" #include "dispatch.h" +static void signalhandler(int sig) +{ + exit (0); +} + +static void system_init () +{ + signal (SIGINT, (void *) (*signalhandler)); + signal (SIGPIPE, SIG_IGN); +} + int main (int argc, char *argv[]) { int a; + system_init (); global_init (); a = msec_now (); gen_crc_table ();