Kill the process if the attempt to close nicely times out.  I've also put some desirable close instructions into the JavaScript.  These don't work because wrapper.run() was designed to block, but maybe I should play by node's rules, let it do it's thing in the main thread and put my window message loop in a new thread.