Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Crashed process returns undefined #22

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

nodejitsu/forever#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

Sorry I thought I ran the tests, I've amended and will update shortly

Owner

indexzero commented Apr 21, 2013

Cherry-picked. Thanks

@indexzero indexzero closed this Apr 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment