nodejitsu/forever-monitor — pull request #22 by smoodiver (2013-03-12 08:31:49+00:00)
Title: Crashed process returns undefined

https://github.com/nodejitsu/forever/issues/343

Crashed processes were showing up as undefined, not restart-able, etc.

So this pretty much does the following:
- Returns valid child data regardless of whether the process is running or not
- Returns the 'running' flag within this child data
- Tweaks some of the logic to deal with cases when trying to restart(all) with a crashed processes. Most of this involved testing for 'running' and 'forceRestart' flags
- Reset the max-attempt counter on a forced restart. This was preventing processes that had crashed out from reaching their limit from ever being manually restarted

Discussion:
The expected result from the issue was that the process crash and silently remove itself from the 'forever list' call. I didn't think this was entirely useful as if I ever query the operating processes there are no obvious visual clues as to which processes have stopped and removed themselves - e.g the ones I need to fix!

So I've gone down another path where the process will remain available for restarting or at the very least to see that it's down. If this is suitable we might like to change the ctime to reflect that the process has ceased. I've submitted a pull request for 'forever' that is dependant on this request, which will indicate a stopped process as 'STOPPED' under the uptime category in lieu of this being present