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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user