$NetBSD: patch-at,v 1.1.1.1 2001/11/15 23:21:31 taca Exp $ --- yatd/entry.c.orig Mon Jul 9 09:51:31 2001 +++ yatd/entry.c @@ -431,7 +431,7 @@ Msg2Cli(SUCCESS, "%.512s @%.256s", szGreeting , SysData.szMyHost); #else - Msg2Cli(SUCCESS, "%.512s <%u.%u@%.256s>", + Msg2Cli(SUCCESS, "%.512s <%u.%ld@%.256s>", szGreeting, SysData.pid, SysData.timeStart, SysData.szMyHost); #endif @@ -560,34 +560,30 @@ #ifdef HAVE_SIGACTION static void signal_handler(int signum){ - CONST char * pMsg; int codeErr; /* sigaction - handler is not re-entrant */ - /* +#if 0 static int fSigHandled = 0; if (fSigHandled){ return ; } fSigHandled = 1; SigBlock(); - */ +#endif - pMsg = NULL; syslog( LOG_DEBUG , "signal_handler call "); switch (signum) { case SIGALRM: codeErr = ERRYS_TIMEOUT; + WARNING(codeErr, 0, NULL, signum); break; - case SIGHUP: - case SIGTERM: default: codeErr = ERRYS_SIGNAL; - pMsg = "#%d"; + WARNING(codeErr, 0, "#%d", signum); break; } - WARNING(codeErr, 0, pMsg, signum); if (SysData.Flags.pidFile) DelPidFile(1); @@ -602,7 +598,7 @@ } #endif - ErrSetData(codeErr, 0, pMsg, signum); + ErrSetData(codeErr, 0, (codeErr == ERRYS_SIGNAL)? "#%d": NULL, signum); Msg2Cli(FAILURE, NULL); exit(1);