Exemplo n.º 1
0
static void TerminateServer(int sig)
{
  fprintf(stderr, "Got signal %d\n", sig);
  Logit("Got signal %d", sig);
  TerminateCleanup();
  net_closeAll();
  main_exit(1);
}
Exemplo n.º 2
0
static void TerminateServer(int sig)
{
	void (*output_shut_mess)(void ) = chessd_function("output_shut_mess");
	void (*TerminateCleanup)(void ) = chessd_function("TerminateCleanup");
	void (*net_close)(void ) = chessd_function("net_close");
	void (*db_disconnect)(void ) = chessd_function("db_disconnect");
	fprintf(stderr,  "CHESSD: Received signal %d\n", sig);
	output_shut_mess();
	TerminateCleanup();
	net_close();
	db_disconnect();
	exit(1);
}