The process's background fibers, created in the layer's own scope, and the
layer's own finalizer: closing the process waits for the set before the rest
of the process's teardown (the connections close after it), so a program that
composes the layer itself — Effect.provide(program, layer), a caller's own
runtime — keeps the whole tail too, not only the entries that run
runMobileApp. The layer does not own the program's run, so it cannot change
the program's result: what the background left — the process's end on a
session-fatal tail answer included — is logged there with Effect.logError
and its cause (the entries turn it into their own rejection, and a program on
the layer learns it from its next call or from awaitMobileProcessBackground).
An interruption abandons the wait: the set's own finalizer interrupts the
fibers, which is what killing the app does.
The process's background fibers, created in the layer's own scope, and the layer's own finalizer: closing the process waits for the set before the rest of the process's teardown (the connections close after it), so a program that composes the layer itself —
Effect.provide(program, layer), a caller's own runtime — keeps the whole tail too, not only the entries that runrunMobileApp. The layer does not own the program's run, so it cannot change the program's result: what the background left — the process's end on a session-fatal tail answer included — is logged there withEffect.logErrorand its cause (the entries turn it into their own rejection, and a program on the layer learns it from its next call or fromawaitMobileProcessBackground). An interruption abandons the wait: the set's own finalizer interrupts the fibers, which is what killing the app does.