aboutsummaryrefslogtreecommitdiff
path: root/src/connection/fork.lisp
Commit message (Collapse)AuthorAge
* rename RETURN-EXIT -> EXIT-CODE-TO-RETVALSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* EVAL-IN-{GRANDCHILD,REINVOKED}: convert from macros to functionsSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use higher-numbered codes for change status, 1 for unhandled errorsSean Whitton2021-11-08
| | | | | | | | When SBCL fails to start up, such as when previously-loaded shared libraries cannot be found while trying to reinvoke a dumped image, it exits 1. We must avoid erroneously interpreting this as a successful attempt to make changes. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* REHOME-CONNECTION: move call to UPLOAD-ALL-PREREQUISITE-DATASean Whitton2021-11-08
| | | | | | | | It's the fact we're changing to a different home directory that's part of the same root filesystem, and with the same UID/GID ranges, that means we call UPLOAD-ALL-PREREQUISITE-DATA with this connection object. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add Linux namespace-entering connectionsSean Whitton2021-11-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* FORK-CONNECTION POST-FORK: note that must not start up any threadsSean Whitton2021-10-23
| | | | | | Per the docstring of EVAL-IN-GRANDCHILD. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* don't fail when stderr from POST-FORK grandchild process is emptySean Whitton2021-08-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* ensure subdeployment lines properly indentedSean Whitton2021-07-24
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* call POST-FORK before WITH-FORK-CONTROLSean Whitton2021-07-24
| | | | | | | This ensures that the fork control child is in the same context as its parent -- for example, that they're both chrooted. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* new approach to calling fork(2) in remote Lisp imagesSean Whitton2021-07-24
| | | | | | | | | | | Drop CAN-PROBABLY-FORK because we now only try to fork(2) in contexts in which there shouldn't ever be any other threads running, apart from Lisp implementation finaliser threads and the like. We no longer need to RESET-DATA-SOURCES before CONTINUE-DEPLOY* because we now only fork(2) in contexts in which *NO-DATA-SOURCES* is t. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* capture fork child stderr & include in call to FAILED-CHANGESean Whitton2021-07-10
| | | | | | | | | | | | | This mirrors what we do with stderr from remote Lisp images. Before this change, when a remote Lisp image forks, the child's stderr is sent to the parent's stderr. But if the parent exits successfully its stderr is discarded (see the :SBCL connection). So if the child failed but the FAILED-CHANGE was handled, perhaps because the fork occurs within SEQPROPS, the user has no way to get at the child's error output. After this change, the error output should be printed to stdout by WITH-SKIP-FAILED-CHANGES. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* signal SKIPPED-PROPERTIES & factor out interpreting exit codesSean Whitton2021-07-10
| | | | | | | | | | | | Unconditionally signalling FAILED-CHANGE does not make sense because perhaps the type of condition C is not a subtype of SIMPLE-CONDITION. Moreover, when we invoke the SKIP-PROPERTY restart we do not actually pass the condition. For simplicity, and since all we need is notification that a SKIP-PROPERTY restart was invoked, instead define and signal a special-purpose condition. Additionally, use an exit code to pass the signal between Lisp images. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use AND not IFSean Whitton2021-06-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* report whether FAILED-CHANGE, :NO-CHANGE or something else at endSean Whitton2021-06-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SBCL connection: propagate :NO-CHANGESean Whitton2021-06-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add missing call to FRESH-LINE in fork connection parentSean Whitton2021-05-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* reflect *MOUNT-BELOW* in OPENED-FILESYSTEM valuesSean Whitton2021-04-30
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* chroot connections: set up bind mounts and virtual filesystemsSean Whitton2021-04-30
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add :OPENED-VOLUMES connattrSean Whitton2021-04-30
| | | | | | | hostattrs don't make sense for this, as it should be possible to gather all hostattrs without examining the host. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* CONTINUE-DEPLOY* connections: push a new connection objectSean Whitton2021-04-30
| | | | | | This is cleaner than resetting certain slot values. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* capture child stdout in case *STANDARD-OUTPUT* has been reboundSean Whitton2021-04-26
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add WITH-THESE-OPEN-VOLUMES macro property combinatorSean Whitton2021-04-16
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add bind mounts TODOSean Whitton2021-04-11
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* propagate :NO-CHANGE out of fork subdeploymentsSean Whitton2021-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace some (REQUIRE "sb-posix") calls with conditional dependencySean Whitton2021-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rework fork(2) connectionsSean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use trivial-backtrace to get a backtrace for forked process failuresSean Whitton2021-03-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add TODO regarding variable captureSean Whitton2021-03-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add TODO regarding backtraces from forked processesSean Whitton2021-03-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add and call RESET-REMOTE-HOMESean Whitton2021-03-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* move CAN-PROBABLY-FORK to CONNECTION.FORKSean Whitton2021-03-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* factor out CONSFIGURATOR.CONNECTION.FORK packageSean Whitton2021-03-23
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>