Callers to WM_exit needed to set G.is_break for a predictable exit-code. This is error prone as G.is_break may be set based on the user having pressed escape during event handling. Instead, pass the exit code as an argument.