Expand description
Co-process supervisor.
When EdgeGuard is run with --wrap "<command>", it launches the user’s app as a
child process and acts as a tiny init for the container: it restarts the child on
crash, and on shutdown forwards a termination signal to the child before exiting.
The child is told to listen on APP_PORT via the PORT env var (the convention
most web frameworks follow), while EdgeGuard itself binds the public $PORT.
The signal/process-group plumbing is Unix-specific; on Windows we fall back to a plain child kill (no process groups, no POSIX signals).
Functions§
- run
- Run the supervised child until
shutdownflips to true.