Skip to content

Instantly share code, notes, and snippets.

@huangjs
Created December 4, 2009 07:50
Show Gist options
  • Save huangjs/248896 to your computer and use it in GitHub Desktop.
Save huangjs/248896 to your computer and use it in GitHub Desktop.
CL-USER> (defvar *a* 1)
*A*
CL-USER> (let ((*a* 2)) (sb-thread:make-thread (lambda () (print *a*))))
1
#<SB-THREAD:THREAD FINISHED values: 1 {100482B0C1}>
CL-USER> (let ((*a* 2)) (when (zerop (sb-posix:fork)) (with-open-file (f "/tmp/a-value" :direction :output) (print *a* f))))
NIL
$ cat /tmp/a-value
2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment