title: Can I add timeout scala.sys.process pipe
body: <p>It somehow related to <a href="https://stackoverflow.com/questions/49614013/how-to-catch-exception-in-scala-sys-process-pipe">How to catch exception in scala.sys.process pipe</a> that I asked a while back. If I download a big file with scala.sys.process like this:</p>
  
  <pre><code>import java.io.File
  import java.net.URL
  import scala.sys.process._
  new URL("http://www.scala-lang.org/") #&gt; new File("scala-lang.html") !
  </code></pre>
  
  <p>There is chance somehow the download never return ( and no exception / return code ) and then block the whole process. Just wonder, can I add some timeout, say an hour, if it don't finish, then having exception ( or fail code? )</p>