USE_DOUBLE_FORK

Fork twice, prevent zombies (V8.12 and above) Port with confENVDEF

When sendmail forks a copy of itself to process a queue, it does so twice to prevent the creation of a zombie process. A zombie process is one that has lost its parent, and has not yet died. It continues to exist as though alive, yet it cannot be killed, hence it is a zombie.

This USE_DOUBLE_FORK compile-time macro is defined by default as 1 to enable the double fork to prevent zombies. In the rare instance that you are porting to a new system, you can redefine USE_DOUBLE_FORK like this:

APPENDDEF(`conf_sendmail_ENVDEF', `-DUSE_DOUBLE_FORK=0')

If you are running a precompiled sendmail binary, you can use the -d0.10 debugging command-line switch (-d0.10 on page 543) to determine whether USE_DOUBLE_FORK is defined (if it appears in the list, it is defined). New ports should be reported to so that they can be folded into future releases.

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.