revert Linux changes and fix messagemanager sigterm issue