From b972fc36fd30791d0ae24287565a6e2ca321c519 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 28 May 1995 20:19:09 +0000 Subject: [PATCH] Use syslog instead of com_err when shutting down as output may be closed and a sigpipe would result. (during dejagnu tests) Use exit instead of return from main as may be on the interrupt stack at the time. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5911 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/v5server/ChangeLog | 7 +++++++ src/kadmin/v5server/srv_main.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/kadmin/v5server/ChangeLog b/src/kadmin/v5server/ChangeLog index baa1ff373..ac32f6481 100644 --- a/src/kadmin/v5server/ChangeLog +++ b/src/kadmin/v5server/ChangeLog @@ -1,3 +1,10 @@ +Sun May 28 15:58:15 1995 Ezra Peisach + + * srv_main.c (main): Use exit instead of return from + main. Otherwise may return to a signal interrupt on + shutdown. + On shutdown - do not output message as stdout may + be closed on receivers end. Fri May 26 17:50:13 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in - Add KDBLIB to dependency list. diff --git a/src/kadmin/v5server/srv_main.c b/src/kadmin/v5server/srv_main.c index 8ce9e6ce4..205fa927b 100644 --- a/src/kadmin/v5server/srv_main.c +++ b/src/kadmin/v5server/srv_main.c @@ -372,7 +372,9 @@ main(argc, argv) } else { /* Received an unhandled signal */ - com_err(programname, 0, unh_signal_fmt, signal_number); +#ifndef DEBUG + syslog(LOG_AUTH|LOG_INFO, unh_signal_fmt, signal_number); +#endif } /* Now clean up after ourselves */ @@ -382,5 +384,5 @@ main(argc, argv) acl_finish(kcontext, debug_level); key_finish(kcontext, debug_level); krb5_xfree(kcontext); - return(error); + exit(error); } -- 2.26.2