Permalink
Browse files

killing simulator processes transformed to shutdown hook

  • Loading branch information...
1 parent 41c3cfd commit ffdbfeeb4186640e89b797fce1ca73493ccf1de1 @papousek papousek committed Oct 5, 2012
@@ -71,13 +71,15 @@ public void register(@Observes IOSConfigured event) throws IOException {
}
applicationLauncher.set(new WaxSimApplicationLauncher(configuration.get(), waxSim.getBinary()));
ready.fire(new IOSReady());
- }
-
- public void killall(@Observes AfterSuite event) throws IOException {
- if (configuration.get().isSkip()) {
- return;
- }
- ProcessExecutor.execute("killall", "iPhone Simulator");
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+ @Override
+ public void run() {
+ try {
+ ProcessExecutor.execute("killall", "iPhone Simulator");
+ } catch (IOException ignored) {
+ }
+ }
+ });
}
}

0 comments on commit ffdbfee

Please sign in to comment.