If I interrupt the optimizer at a certain point, multiple nrniv tasks remain running. A sigint handler at the right place should do the trick.