22 #include <grass/gis.h>
23 #include <grass/glocale.h>
30 static RETSIGTYPE handle_sigpipe(
int sig)
35 static RETSIGTYPE handle_sigterm(
int sig)
53 struct sigaction sigact;
66 G_warning(
"Usage: %s <name> [-]", argv[0]);
73 foreground = (argc >= 3 && argv[2][0] ==
'-');
77 sigact.sa_handler = handle_sigpipe;
78 sigemptyset(&sigact.sa_mask);
80 sigaction(SIGPIPE, &sigact,
NULL);
82 sigact.sa_handler = handle_sigterm;
83 sigemptyset(&sigact.sa_mask);
85 sigaction(SIGTERM, &sigact,
NULL);
90 G_message(_(
"Graphics driver [%s] started"), me);
110 setpgrp(0, getpid());
135 G_warning(
"Monitor <%s>: Caught SIGPIPE", me);
143 G_warning(
"Monitor <%s>: Premature EOF", me);
void command_init(int rfd, int wfd)
int COM_Work_stream(void)
void COM_Client_Open(void)
int process_command(int c)
void COM_Graph_close(void)
void COM_Client_Close(void)
int get_connection_sock(int, int *, int *, int)
int prepare_connection_sock(const char *)
void G_message(const char *msg,...)
Print a message to stderr.
G_warning("category support for [%s] in mapset [%s] %s", name, mapset, type)
int LIB_main(int argc, char **argv)
int G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.