ONC+ Developer's Guide

Terminating a Port Monitor

A port monitor must terminate itself gracefully on receipt of the signal SIGTERM. The termination sequence is as follows:

  1. The port monitor enters the stopping state. No further service requests are accepted.

  2. Any attempt to re-enable the port monitor is ignored.

  3. The port monitor yields control of all ports for which it is responsible. A new instantiation of the port monitor must be able to start correctly while a previous instantiation is stopping.

  4. The advisory lock on the process ID file is released. After this lock is released, the contents of the process ID file are undefined and a new invocation of the port monitor can be started.