1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-28 03:51:53 +02:00

environment: Correctly handle abnormal exits.

Fixes <http://bugs.gnu.org/21958>.

* guix/scripts/environment.scm (status->exit-code): New procedure.
(exit/status, primitive-exit/status): Use it.
* tests/guix-environment-container.sh: Add test.
This commit is contained in:
Ludovic Courtès
2015-11-21 22:24:45 +01:00
parent 6493fd0458
commit 82e64fc14e
2 changed files with 16 additions and 2 deletions
+7
View File
@@ -81,3 +81,10 @@ grep $(guix build guile-bootstrap) $tmpdir/mounts
grep -e "$NIX_STORE_DIR/.*-bash" $tmpdir/mounts # bootstrap bash
rm $tmpdir/mounts
if guix environment --bootstrap --container \
--ad-hoc bootstrap-binaries -- kill -SEGV 2
then false;
else
test $? -gt 127
fi