Skip to content

Instantly share code, notes, and snippets.

@edw
Created April 20, 2020 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edw/27112119a310ee1a1820017a3179fc05 to your computer and use it in GitHub Desktop.
Save edw/27112119a310ee1a1820017a3179fc05 to your computer and use it in GitHub Desktop.
Get pid in Clojure under Linux for older Java implementation
(defn get-pid
"Get pid under Linux for older Java implementations"
[]
(-> (java.io.File. "/proc/self")
.getCanonicalFile
.getName
Integer/parseInt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment