title: Using scala.sys.process with timeout
body: <p>I find it extreemly cool to use <a href="http://www.scala-lang.org/api/2.11.4/index.html#scala.sys.process.package" rel="noreferrer">standard syntax</a> like</p>
  
  <pre><code>import scala.sys.process._
      val countLogger = ProcessLogger(line =&gt; {println ("out line: " + line)},
                                   line =&gt; {println ("err line: " + line)})
  
      val exitCode = ("cat prog.c" #&amp;&amp; "gcc prog.c -o prog -lm" 
              #&amp;&amp; "echo running, this may hang" #&amp;&amp; "prog.exe") ! countLogger
  
      println("exitCode = " + exitCode)
  </code></pre>
  
  <p>It however happens that last process hangs. Is it possible to kill it on timeout?</p>