summaryrefslogtreecommitdiff
path: root/vim/bundle/slimv/swank-clojure/swank/util/sys.clj
blob: f76c31968cf08709e227200d2beb39e88d6108c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(ns swank.util.sys)

(defn get-pid
  "Returns the PID of the JVM. This is largely a hack and may or may
   not be accurate depending on the JVM in which clojure is running
   off of."
  ([]
     (or (first (.. java.lang.management.ManagementFactory (getRuntimeMXBean) (getName) (split "@")))
         (System/getProperty "pid")))
  {:tag String})

(defn user-home-path []
  (System/getProperty "user.home"))