Fix client so that it terminates all processes on exit (and so can exit
when requested!).