philmander/ant-jstestrunner — pull request #2 by coulsonr (2013-05-17 19:56:05+00:00)
Title: Work around for phantom.exit not always exiting correctly on Windows.

Phil -

I had an issue with phantomjs 1.9.0 not exiting properly in my Windows environment (Windows 7 64-bit). For me, phantomjs.exe will just hang whenever phantom.exit() is called. I've made a change that allows PhantomTestRunner to destroy the phantomjs.exe process based on some known input back from the process stream. It's a bit of a hack, but it is clean in the sense that we know when we want to call phantom.exit(), so we inject a "well known" string that we can take action on that allows us to destroy the process and allow any caller to return. Without this change, my ant task would simply hang indefinitely.