method
Process.free
Process.free(handle) -> void
Releases the handle so it can be reused. It does not stop a child that is still running — use Process.kill first for that; such a child keeps running and is reaped by the runtime when it ends, so it never lingers as a zombie. After free, polling the old handle answers 255.
Example
program Demo {
entry {
let h = Process.spawn("/bin/sh", ["-c", "exit 0"])
var code = Process.poll(h)
while code == -1 { code = Process.poll(h) }
Process.free(h)
}
}