added process.exit -> window.close

added support for process.exit()