Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the
Process
signal handling to follow best practicesand do as little as possible when trapping signals. It now simply
writes the signal to an IO pipe. The idea is that you want to avoid
the logic for trapping a signal raising any errors. The previous
implementation didn't do a good job of this because it would change
the daemon's state, write to an IO pipe and write to redis (by
calling
stop
orhalt
on the daemon). This left a greater chancefor it to fail while handling the signal which might cause the
system to get into a bad state. This also makes it better handle
multiple signals being sent to the process and avoid getting in a
bad state from trying to handle them all simultaneously.
This also does some minor improvements to the
Process
. It nowlogs when it receives and handles signals. This is to make it more
clear what the process is doing. Its also more robust in that it
won't error if we start using signals that are not supported on
some operating systems.
Finally, this removes the datetime from the bench and system test
logs. The default datetime is very long and makes the logs
annoying to read.
@kellyredding - Ready for review.