#include <iostream.h>
#include "client.h"
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>

int interrupted = 0;
#if 0
void sighandler (int s) {
  cerr << "caught " << strsignal(s) << " exitting" << endl;
  interrupted++;
  server_exit();
}
#endif
main() {
#if 0
  signal(SIGINT, sighandler);
  signal(SIGTERM, sighandler);
  signal(SIGHUP, sighandler);
  signal(SIGSTOP, sighandler);
#endif
  if (server_init() != 0)
    exit (-1);
  
  cout << "server sucessfully initialised" << endl;
  while (!interrupted) {
    DOS_AX = 5;
    Daemon_int86 (0xe6);
//    sleep (1);
  }
  server_exit();
}
