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


Previous Section Next Section

SPT_TYPE

Adapt/exclude process title support port, edit sendmail/conf.h

Whenever a program first begins to run, Unix provides it with two arrays of information: its command-line arguments, and the environment under which it was run. When you run ps(1) to see what processes are doing, ps prints the command line that was used to run each program.

To provide more useful information (such as current status or host connected to), sendmail saves its command line and environment, then periodically uses that system space to display its status. This ability provides a valuable tool for monitoring what each invocation of sendmail is doing.

The method to display this information is correctly defined in sendmail/conf.c (include/sm/conf.h with V8.12 and above) for all supported systems. In the rare event that you need to port sendmail to another system, you can do so by defining SPT_TYPE in sendmail/conf.h. The values that can be assigned to this SPT_TYPE are listed in Table 3-13.

Table 3-13. Values available for use with SPT_TYPE

Define

Description

SPT_BUILTIN

The system library has setproctitle(2).

SPT_CHANGEARGV

Write pointers to our own strings into the existing argv vector.

SPT_NONE

Don't try to set the process title at all.

SPT_PSSTRINGS

Use the magic PS_STRINGS pointer (4.4BSD).

SPT_PSTAT

Use the PSTAT_SETCMD option to pstat(2).

SPT_REUSEARGV

Replace your argv with the information.

SPT_SCO

Write to the kernel's u. area.

SPT_SYSMIPS

Use sysmips(2) supported by NEWS-OS 6.

If you set SPT_TYPE to SPT_REUSEARGV, you will also have to define SPT_PADCHAR, the character used to pad the process title. If the SPT_PADCHAR compile-time macro is undefined, the space character is used to pad.

New ports should be reported to sendmail@sendmail.org so that they can be folded into future releases.

    Previous Section Next Section