RosettaCodeData/Task/Fork/Common-Lisp/fork.lisp
2023-07-01 13:44:08 -04:00

5 lines
221 B
Common Lisp

(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."))))