Use syslog instead of com_err when shutting down as output may be closed and
authorEzra Peisach <epeisach@mit.edu>
Sun, 28 May 1995 20:19:09 +0000 (20:19 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 28 May 1995 20:19:09 +0000 (20:19 +0000)
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
src/kadmin/v5server/srv_main.c

index baa1ff37350ccadd0f4281d8e23b42c666aba35b..ac32f64813d98cc8909cf19cd064cbf67bf11799 100644 (file)
@@ -1,3 +1,10 @@
+Sun May 28 15:58:15 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * 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.
index 8ce9e6ce4ad494ff35bb36147570f0813fb199c9..205fa927b1e5af70252e24b2a312a02a96e94239 100644 (file)
@@ -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);
 }