Created
February 25, 2018 10:22
-
-
Save phoe/6eefaee33a8ae1ef924547221ee64597 to your computer and use it in GitHub Desktop.
Thread PIDs on SBCL on Linux
This file contains hidden or 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
;; NOTE: absolutely non-portable | |
* (sb-alien:alien-funcall | |
(sb-alien:extern-alien "syscall" (function sb-alien:unsigned int)) 186) | |
3288 ;; this is the correct PID of the main SBCL thread | |
* (bt:make-thread (lambda () | |
(sb-alien:alien-funcall | |
(sb-alien:extern-alien "syscall" (function sb-alien:unsigned int)) 186))) | |
#<SB-THREAD:THREAD "Anonymous thread" FINISHED values: 3412 {100364B363}> | |
* (bt:join-thread *) | |
3412 ;; 3412 is the correct PID of the SBCL thread that was created to serve that request |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment