1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

container: Correctly report exit status.

* gnu/build/linux-container.scm (container-excursion): Return the raw
status value.
* tests/containers.scm ("container-excursion, same namespaces"): Add
'status:exit-val' call.
* guix/scripts/container/exec.scm (guix-container-exec): Correctly
handle the different cases.
This commit is contained in:
Ludovic Courtès
2023-01-29 22:13:53 +01:00
parent 17448c8afa
commit 52eb3db19c
3 changed files with 15 additions and 6 deletions

View File

@@ -203,9 +203,10 @@
42
;; The parent and child are in the same namespaces. 'container-excursion'
;; should notice that and avoid calling 'setns' since that would fail.
(container-excursion (getpid)
(lambda ()
(primitive-exit 42))))
(status:exit-val
(container-excursion (getpid)
(lambda ()
(primitive-exit 42)))))
(skip-if-unsupported)
(test-assert "container-excursion*"