https://toitlang.org/ logo
Maybe something like this? ``` import system.cont...
# general
k
Maybe something like this?
Copy code
import system.containers

my-function -> int:
  return 42

main arguments:
  // We run multiple containers from the same image (the current one),
  // so we need to distinguish between the outermost invocation and
  // the ones for the child containers.
  if arguments is Map:
    exit my-function

  // Here we are passing an empty map to main in the other container,
  // so we can distinguish between the child and the parent container.
  container := containers.start containers.current {:}
  print container.wait