return success when window is closed
Merge pull request #138 from aroig/exitstatus

return success when the window is closed