(catch 'system-error (lambda () (match (clone (logior CLONE_NEWUSER SIGCHLD)) (0 (letrec ((fibonacci (lambda (n x prev current) (if (> x n) current (let ((new (pk 'new (+ prev current)))) (fibonacci n (+1 x) current new)))))) (fibonacci 10000 0 1 1) (gc) ;create a garbage collection thread (sigaction SIGPIPE SIG_IGN) (begin-thread (lambda () #t)) (call-with-new-thread (lambda () (unshare CLONE_NEWNS))) (primitive-exit 0))) (pid (match (waitpid pid) ((_ . status) (zero? status)))))) (lambda args (system-error-errno args)))