Fix OSX attach exit issue Upstream-commit: ba49f5bce14e3cec900f3ab3bce9394d22d37db8 Component: engine