In Clojure, how do I send an exit command to a process created by Clojure.java.shell/sh
<p>I am trying to run pocketsphinx from clojure. I have written the following .sh script</p>

<p><code>unbuffer pocketsphinx_continuous -innmic yes &gt; pipe</code> and I want to call this process using (shell/sh).</p>

<p>Unbuffer allows pocketsphinx to properly flush its data out to pipe where it can be read line by line. </p>

<p>The problem I am having is I do not know how to properly kill the process. It will run forever and never return control. If I kill the thread it is running on, the process that the sh command spawned still runs. The only thing I can think of is running <code>kill</code> on the <code>pid</code></p>