GNU bug report logs - #70494
[PATCH 00/23] Groundwork for the Guile guix-daemon

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 21 Apr 2024 09:37:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 70494 <at> debbugs.gnu.org
Subject: [bug#70494] [PATCH 13/23] syscalls: Add unshare.
Date: Thu, 16 May 2024 18:14:47 +0200
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.