]> mj.ucw.cz Git - umpf.git/blobdiff - umpf.c
fix many little bugs, release 0.1
[umpf.git] / umpf.c
diff --git a/umpf.c b/umpf.c
index 663294f752b1d21aa4c193bef4737238068c925f..52a8449ca3d801d18f6591a65b01c2a334de3f4a 100644 (file)
--- a/umpf.c
+++ b/umpf.c
@@ -5,6 +5,7 @@
 #include <getopt.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <signal.h>
 
 #include "umpf.h"
 
@@ -13,6 +14,7 @@
 void
 init(void)
 {
+       signal(SIGPIPE, SIG_IGN);
        list_init(&input_code);
        var_hash = new_var_hash();
        const_tab = xmalloc(BUFSIZE);
@@ -96,6 +98,7 @@ main(int argc, char** argv)
        int res, i, opt;
        char* conffile = NULL;
        
+       save_gids();
        while ((opt = getopt(argc, argv, "c:m:")) != -1) {
                switch (opt) {
                case 'm':
@@ -118,7 +121,6 @@ main(int argc, char** argv)
                default_mailbox = cat("/var/mail/", p->pw_name);
        }
 
-               save_gids();
        init();
 
        /* returning from longjump? save the mail and exit */