erlang/otp — pull request #53 by fishcakez (2013-07-31 22:45:51+00:00)
Title: Fix sys:get_state/2 and sys:replace_state/3 when sys suspended

Currently it is not possible to use `sys:get_state/2` and `sys:replace_state/3` after calling `sys:suspend/2`. This patch adds two new system callbacks `system_get_state/1` and `system_replace_state/2` that will only be used when the current method of intercepting the system message is not present or the process is suspended by sys. The generic otp behaviours are updated to use the callbacks.