/tools/

'shortcut icon' href='/cgit-static/favicon.ico'/>
aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/linux-container.scm
AgeCommit message (Collapse)Author
2023-01-30linux-container: 'container-excursion' forks to join the PID namespace.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/61156>. * gnu/build/linux-container.scm (container-excursion): Add extra call to 'primitive-fork' and invoke THUNK in the child process. * tests/containers.scm ("container-excursion"): Remove extra 'primitive-fork' call, now unnecessary. ("container-excursion*, /proc"): New test.
2023-01-30container: Correctly report exit status.Ludovic Courtès
* 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.
2022-09-24linux-container: Mark socket pair as SOCK_CLOEXEC.Ludovic Courtès
* gnu/build/linux-container.scm (run-container): Pass SOCK_CLOEXEC to 'socketpair'.
2022-09-20linux-container: 'container-excursion*' marks its FDs as FD_CLOEXEC.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/57827>. Reported by Mathieu Othacehe <othacehe@gnu.org>. Fixes a regression introduced with the Shepherd 0.9.2 upgrade in 1ba0e38267c9ff8bb476285091be6e297bbf136e, whereby IN and OUT would no longer be closed when 'fork+exec-command/container' would call 'exec-command*' as part of the THUNK passed to 'container-excursion*'. This is because the Shepherd 0.9.2 assumes file descriptors are properly marked as O_CLOEXEC and, consequently, 'exec-command' no longer run the close(2) loop prior to 'exec'. * gnu/build/linux-container.scm (container-excursion*): Add calls to 'fcntl'.
2022-05-01linux-container: Add #:child-is-pid1? parameter to 'call-with-container'.Ludovic Courtès
* gnu/build/linux-container.scm (wait-child-process) (status->exit-status): New procedures. (call-with-container): Add #:child-is-pid1? parameter and honor it. [thunk*]: New variable. Pass it to 'run-container'.
2022-05-01linux-container: Ensure signal-handling asyncs get a chance to run.Ludovic Courtès
Previously we could enter the blocking 'waitpid' call and miss an opportunity to run the signal handler async. * gnu/build/linux-container.scm (call-with-container) [periodically-schedule-asyncs]: New procedure. [install-signal-handlers]: Call it.
2022-05-01linux-container: 'call-with-container' relays SIGTERM and SIGINT.Ludovic Courtès
* gnu/build/linux-container.scm (call-with-container): Add #:relayed-signals. [install-signal-handlers]: New procedure. Call it.