summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index bfd62b9..a71ac08 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,6 +25,11 @@
#include "errors.h"
#include <stdlib.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <unistd.h>
static MetaExitCode meta_exit_code = META_EXIT_SUCCESS;
static GMainLoop *meta_main_loop = NULL;
@@ -32,6 +37,15 @@ static GMainLoop *meta_main_loop = NULL;
int
main (int argc, char **argv)
{
+ struct sigaction act;
+ sigset_t empty_mask;
+
+ sigemptyset (&empty_mask);
+ act.sa_handler = SIG_IGN;
+ act.sa_mask = empty_mask;
+ act.sa_flags = 0;
+ sigaction (SIGPIPE, &act, 0);
+
g_set_prgname (PACKAGE);
meta_main_loop = g_main_loop_new (NULL, FALSE);