Earthworm Modules:
Stopmodule Overview

(last revised March 1, 2007)

The stopmodule command line utility requests that Earthworm terminates the particular module associated with the PID (Process ID) you give stopmodule as a parameter. (Use 'status' to find the PID for your module if you don't know it.)

The stopmodule attaches to earthworm's first shared memory ring (first listed in starstop*d) and sends a TYPE_STOP message with a payload of the PID. This is intended to signal that processid to terminate gracefully.

Startstop sees the TYPE_STOP message and will 1) request the module shut itself down gracefully; that failing it will 2) hard kill the module. Startstop will mark this module as "Stop" after it has confirmed the process is dead.

Statmgr sees a TYPE_STOP message and sets a it's internal restart status for that module to STOPPED. Until statmgr sees a TYPE_RESTART message for a stopped module, it should not request a restart of the module.

If startstop is quit, and restarted (Earthworm shut down completely and then started), and you didn't manually remove the module you stopped from the startstop*d, the previously stopped module WILL start up in the new session.

Warning: On Solaris there's a shell command called "stop". If you accidentally type "stop <pid>" instead of "stopmodule <pid>", Solaris won't be able to stop or restart the module in question. The solution: in a unix command prompt, "kill <pid>", then "restart <pid>", then finally "stopmodule <newpid>"

Module Index | Stopmodule Commands


Questions? Issues? Subscribe to the Earthworm Google Groups List.