Expand description
The process-ready handshake: one machine-readable line on the server’s stdout, naming the address it actually bound and the pid that owns it.
This is what makes --port 0 usable, and --port 0 is what deletes
an entire class of feature from the desktop shell. A supervisor that
must pick the port itself needs to know whether the port is free,
which needs an “is something already listening” probe, which needs
“who owns it” to tell a stale copy of ourselves from a stranger’s
server, which needs a platform-specific lsof/netstat shell-out
and a dialog to explain the result. Letting the kernel pick the port
and having the child say what it got replaces all of it with one
line of JSON.
One line, JSON, on stdout, prefixed by nothing: parsers should read
stdout line by line and ignore any line that is not JSON carrying
event == READY_EVENT, since tracing/log output shares the
stream on some configurations.
Structs§
Constants§
- READY_
EVENT - The
eventdiscriminator of the ready line. Present so a parser can tell this line from any other JSON a future version might print.