environment: Properly handle SIGINT.
authorDavid Thompson <dthompson2@worcester.edu>
Sat, 26 Mar 2016 12:45:08 +0000 (08:45 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Sun, 27 Mar 2016 19:09:21 +0000 (15:09 -0400)
commit13bc8d5e4f842fe595306c22c99a5868d8016318
treeaa68f2d597da1bcb8a34eabf83f8c06a4181d63f
parentc8786834ef53501e4ef0090b95520e4cefbe5b7b
environment: Properly handle SIGINT.

Switching to execlp means that the process spawned in a container is PID
1, which obsoleted one of the 'guix environment --container' tests
because the init process can't be killed in the usual manner.

* guix/scripts/environment.scm (launch-environment/fork): New procedure.
(launch-environment): Switch from system* to execlp.  Add handler for
SIGINT.
(guix-environment): Use launch-environment/fork.
* tests/guix-environment-container.sh: Replace abnormal exit test with
one that works now that the spawned process is PID 1.
guix/scripts/environment.scm
tests/guix-environment-container.sh