GNU bug report logs -
#70494
[PATCH 00/23] Groundwork for the Guile guix-daemon
Previous Next
Full log
View this message in rfc822 format
Christopher Baines <mail <at> cbaines.net> skribis:
> * guix/build/syscalls.scm (unshare): New procedure.
>
> Change-Id: I7caad207117b17b349290e680277f650c51d2f3b
[...]
> +(define unshare
> + (false-if-exception
> + (let ((proc (syscall->procedure int "unshare" (list int))))
> + (lambda (flags)
> + (let ((ret err (proc flags)))
> + (unless (zero? ret)
> + (throw 'system-error "unshare" "~d ~d: ~A"
> + (list flags (strerror err))
> + (list err))))))))
Please remove ‘false-if-exception’, add a docstring, and add a test or
two.
(I find that unshare(2) is not that useful because a process cannot
unshare(2) its PID namespace: it has to fork to do that. At that point,
one might as well call clone(CLONE_NEWPID) directly.)
Ludo’.
This bug report was last modified 1 year and 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.