local.c

dgd/src/host/unix/local.c · 525 B

From the archive dgd-1.2p4.tar.gz

Download the archive   « Back to the archive contents

# include "dgd.h"
# include <signal.h>

/*
 * NAME:	term()
 * DESCRIPTION:	catch SIGTERM
 */
static void term()
{
    signal(SIGTERM, term);
    interrupt();
}

/*
 * NAME:	main()
 * DESCRIPTION:	main program
 */
int main(argc, argv)
int argc;
char *argv[];
{
    P_srandom((long) P_time());
    signal(SIGPIPE, SIG_IGN);
    signal(SIGTERM, term);
    return dgd_main(argc, argv);
}

/*
 * NAME:	P->message()
 * DESCRIPTION:	show message
 */
void P_message(mess)
char *mess;
{
    fputs(mess, stderr);
    fflush(stderr);
}

Site Stats

Snippets: 1791
Codebases: 571