Wietse Venema:
> To make the master 'pid 1' one would have to use 'exec
> $daemon_directory/master' in the 'postfix-script' file.
>
> However, that fails on every system that I know:
>
> postfix-master[xxx]: fatal: unable to set session and process group ID:
> Operation not permitted
Just for the heck of it, what happens when you change postfix-script
to do this (delete line starting with -, add lines starting with +):
start-fg)
# Foreground start-up is incompatible with multi-instance mode.
# We can't use "exec $daemon_directory/master" here: that would
# break process group management, and "postfix stop" would kill
# too many processes.
case $instances in
- "") exec $daemon_directory/master
+ "") exec $daemon_directory/master -d
+ $FATAL "could not start-fg $daemon_directory/master"
;;
*) $FATAL "start-fg does not support multi_instance_directories"
exit 1
;;
esac
See what happens with 'postfix stop' and if it kills too much.
Wietse
> The master daemon must run in its own process group and session,
> so that after receiving a "postfix stop" signal, the master can
> terminate all Postfix daemon processes including processes that
> 'hang', by sending a signal to the process group.
>
> If the master would not have its own process group and session, it
> would kill too many processes. People who ran the master that way
> found that Postfix would kill its parent, i.e. the real system init
> process, and shutdown the system. That would be unacceptable.
>
> If the master would not kill all Postfix daemon processes including
> processes that 'hang', it would be impossible to restart Postfix
> without a human manually killing off the hanging process. That would
> also be unacceptable.
>
> Wietse
>