aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-09-23 22:48:16 +0200
committerLudovic Courtès <ludo@gnu.org>2022-09-24 17:59:04 +0200
commit00d5bb5d7f18555c250b4a6ef0b33b628acc3a3a (patch)
treedde3b2319e5e9dad22c75a76a2e4b1a20548f9f7
parent08023bcab35faafcf3e9c77babe910d9ece240d2 (diff)
downloadguix-00d5bb5d7f18555c250b4a6ef0b33b628acc3a3a.tar
guix-00d5bb5d7f18555c250b4a6ef0b33b628acc3a3a.tar.gz
linux-container: Mark socket pair as SOCK_CLOEXEC.
* gnu/build/linux-container.scm (run-container): Pass SOCK_CLOEXEC to 'socketpair'.
-rw-r--r--gnu/build/linux-container.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 73db127974..72e3a45422 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -233,7 +233,7 @@ that host UIDs (respectively GIDs) map to in the namespace."
;; The parent process must initialize the user namespace for the child
;; before it can boot. To negotiate this, a pipe is used such that the
;; child process blocks until the parent writes to it.
- (match (socketpair PF_UNIX SOCK_STREAM 0)
+ (match (socketpair PF_UNIX (logior SOCK_CLOEXEC SOCK_STREAM) 0)
((child . parent)
(let ((flags (namespaces->bit-mask namespaces)))
(match (clone flags)