-bD

-bD

Run as a daemon, but don't fork V8.8 and above

The -bD command-line switch is almost exactly the same as the -bd switch. That is, it causes sendmail to run as a daemon, but unlike the -bd switch, it prevents sendmail from performing a fork (2) and thereby keeps sendmail in the foreground. The -bD switch also prevents detaching from the controlling terminal (just as does the -d99.100 debugging switch, -d99.100).

This -bD command-line switch allows sendmail to be run from a "wrapper" scriptfor example, to detect whether it died or was killed :

 #!/bin/sh SENDMAIL=/usr/sbin/sendmail UCBMAIL=/usr/ucb/mail if [ -f $SENDMAIL -a -f $UCBMAIL ] then         $SENDMAIL -bD -q1h         echo ${SENDMAIL}, which should run forever, died \                  $UCBMAIL -s "Sendmail died" root fi 

Note that the echo line will never be reached as long as sendmail continues to run. Also note that you will not be able to restart sendmail in the usual manner with a SIGHUP if you use this script.



Sendmail
sendmail, 4th Edition
ISBN: 0596510292
EAN: 2147483647
Year: 2002
Pages: 1174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net