Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to call clojure.contrib.shell-out/sh with timeout
(use '[clojure.contrib.shell-out :only [sh]])
(defn sh-timeout [timeout-in-seconds & args]
(.get
(future-call #(apply sh args))
timeout-in-seconds
(java.util.concurrent.TimeUnit/SECONDS)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.