Finally, we explain the use of the
syslog(3) facility, illustrate several ways to tune its output, and describe the meaning
of that output.
14.1 Signal the Daemon
The sendmail program recognizes three signals that cause it to perform certain
actions. SIGINT and SIGTERM cause sendmail to clean up after itself and exit.
Beginning withV8.7, SIGHUP causes sendmail to re-execute itself (thus restarting
and reading its configuration file anew). Also beginning withV8.7, SIGUSR1 causes
sendmail to log its file descriptors and other information.
14.1.1 SIGTERM
Cleanup and exit sendmail signal
Whenever sendmail gets a SIGTERM signal (as would be the case if the system were being
shut down), it tries to exit cleanly.
First, it unlocks any queued file it is processing. This has the effect of canceling delivery so
that the message will be tried again when the system comes back up. Then sendmail resets
its identity to the identity it originally ran under. This causes accounting records to
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
14.1 Signal the Daemon | 509
correctly show that the same user sendmail started as has exited. Finally, sendmail exits
with EX_OK, no matter what, so that errors will not be produced during shutdown.
14.1.2 SIGINT
Handle Ctrl-C sendmail signal
Before V8.
Pages:
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910