The child canvas

VERSION a9b38ce
The child canvas

This canvas is called by the parent example. WHO is a child document variable; it enters the process only through the block's env attribute.

Run the child directly to compare its output with the parent's nested output:

meshfox examples/canvas-call-data/child.canvas.md run greet --set WHO=direct
printf 'Hello, %s!\n' "$WHO"
printf 'Child working directory: %s\n' "$PWD"
sleep 0.4
printf 'Child started: cancellation should stop this run.\n'
sleep 15
printf 'Child completed.\n'
Ask

The parent can collect this application's input in its own UI, while the value remains owned by this child canvas.

printf 'Child received: %s\n' "$INPUT"
sleep 0.4
Fail

An intentional failure for checking propagation to the parent.

printf 'Intentional child failure.\n' >&2
exit 7