diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/build/linux-container.scm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index 70e789403fe..65e13255776 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> | 2 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> |
| 3 | ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; | 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 6 | ;;; |
| @@ -61,9 +61,14 @@ exists." | |||
| 61 | (const #t) | 61 | (const #t) |
| 62 | (lambda () | 62 | (lambda () |
| 63 | (thunk) | 63 | (thunk) |
| 64 | (primitive-exit 0)) | 64 | |
| 65 | ;; XXX: Somehow we sometimes get EBADF from write(2) or close(2) upon | ||
| 66 | ;; exit (coming from fd finalizers) when used by the Shepherd. To work | ||
| 67 | ;; around that, exit forcefully so fd finalizers don't have a chance to | ||
| 68 | ;; run and fail. | ||
| 69 | (primitive-_exit 0)) | ||
| 65 | (lambda () | 70 | (lambda () |
| 66 | (primitive-exit 1)))) | 71 | (primitive-_exit 1)))) |
| 67 | 72 | ||
| 68 | (define (purify-environment) | 73 | (define (purify-environment) |
| 69 | "Unset all environment variables." | 74 | "Unset all environment variables." |
| @@ -335,7 +340,8 @@ return the exit status." | |||
| 335 | (match (container-excursion pid | 340 | (match (container-excursion pid |
| 336 | (lambda () | 341 | (lambda () |
| 337 | (close-port in) | 342 | (close-port in) |
| 338 | (write (thunk) out))) | 343 | (write (thunk) out) |
| 344 | (close-port out))) | ||
| 339 | (0 | 345 | (0 |
| 340 | (close-port out) | 346 | (close-port out) |
| 341 | (let ((result (read in))) | 347 | (let ((result (read in))) |
