home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

FORK

The type of fork to use port, edit sendmail/conf.h

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:

[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).

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 sendmail@sendmail.org so that they can be folded into future releases.

    Previous Section Next Section