Name

FORK

Synopsis

The sendmail program forks often to do its job in the most efficient way possible. Prior to V8.8, sendmail used vfork(2) whenever possible. Beginning with V8.8, sendmail now defaults to fork(2).[3] You should have to redefine FORK only when porting to a new system or when you are certain that vfork(2) is, indeed, faster on your system and is reliable. To add it to sendmail (and other programs that use FORK), place a line such as the following to your Build m4 file:

APPENDDEF(`confENVDEF', `-DFORK=vfork')

You can test with the above confENVDEF statement and, if successful, put a permanent porting entry into sendmail/conf.h. New ports should be reported to so that they can be folded into future releases.

[3] Bugs in the interaction between NIS and vfork(2) at the system level with Solaris and systems that lacked vfork(2) altogether, such as Irix, caused V8.8 to favor fork(2). This is really OK because in modern systems, fork(2) is just as fast as vfork(2).

Get Sendmail, 3rd 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.