]> source.dussan.org Git - rspamd.git/commitdiff
* SI_ code macroses are not BSD compatible, avoid using them
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 5 Nov 2009 15:13:07 +0000 (18:13 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 5 Nov 2009 15:13:07 +0000 (18:13 +0300)
src/main.c

index df3945ae12581d31f40b0ead5177a18b5633ba32..994d6c2ccf96da35bfcc5567e74870e7d02ac1df 100644 (file)
@@ -114,27 +114,6 @@ sig_handler (int signo, siginfo_t *info, void *unused)
 
 #ifdef HAVE_SA_SIGINFO
 
-static const char *
-strsigcode (int code)
-{
-       switch (code) {
-               case SI_USER:
-                       return "kill(2) or raise(3)";
-                       break;
-               case SI_KERNEL:
-                       return "sent by the kernel";
-                       break;
-               case SI_TIMER:
-                       return "POSIX timer expired";
-                       break;
-               case SI_SIGIO:
-                       return "queued SIGIO";
-                       break;
-               default:
-                       return "unknown reason";
-       }
-}
-
 static const char *
 chldsigcode (int code) {
        switch (code) {
@@ -163,9 +142,8 @@ print_signals_info ()
                                        (long int)inf->si_pid, chldsigcode (inf->si_code));
                }
                else {
-                       msg_info ("main: got signal: '%s'; received from pid: %ld; uid: %ld; reason: '%s'",
-                                       g_strsignal (inf->si_signo), (long int)inf->si_pid, (long int)inf->si_uid, 
-                                       strsigcode (inf->si_code));
+                       msg_info ("main: got signal: '%s'; received from pid: %ld; uid: %ld",
+                                       g_strsignal (inf->si_signo), (long int)inf->si_pid, (long int)inf->si_uid);
                }
                g_free (inf);
        }