Open jpommerening opened 10 years ago
I added another commit to handle SIGINT / Ctrl-c.
Karma listens for SIGINT and takes care of stopping all the browsers. Grunt, however, does not. So after Karma finished, Grunt will just continue running its task queue.
Since Grunt does not listen for SIGINT one would expect Ctrl-c to exit the process immediately. The best we can do is to add our own SIGINT listener and exit the process after Karma is finished.
This seems long dead, but we still get problems on our CI machine with browsers hanging around from grunt-karma failures. It would great to see this updated and merged.
@jpommerening could you rebase this onto latest master
please?
As I mentioned in #93, Grunt's
uncaughtException
listeners fire before Karma gets a chance to stop the browsers it started.The only fix that I can think of is removing Grunt's listners for as long as Karma is running. That way, Karma can gracefully handle a framework raising an error or the user pressing Ctrl-c.
I made a small gist to reproduce the problem: https://gist.github.com/jpommerening/10364033
After running
npm install
, running Grunt will (probably) produce the following output:To try the same thing with the changes in this PR: