RosettaCodeData/Task/Fork/Common-Lisp/fork.lisp

6 lines
221 B
Common Lisp
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
(let ((pid (sb-posix:fork)))
(cond
((zerop pid) (write-line "This is the new process."))
((plusp pid) (write-line "This is the original process."))
(t (error "Something went wrong while forking."))))