Skip to main content

run_if_worker

Function run_if_worker 

Source
pub fn run_if_worker()
Expand description

If this process was spawned as a render worker, do that work and exit.

Call first thing in main. Returns only when this is a normal invocation.

The protocol is deliberately minimal: page number and width on the command line, the PDF path too, PNG bytes on stdout, a message on stderr, and the exit code carrying success. Anything richer would need a serialization format on both sides of a boundary whose entire purpose is that one side may die unexpectedly.