Created
April 20, 2020 12:28
-
-
Save edw/27112119a310ee1a1820017a3179fc05 to your computer and use it in GitHub Desktop.
Get pid in Clojure under Linux for older Java implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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