Exit v0.1.0
Ending the process, and its identifier.
Exit
pub func Exit(code: int32)
Ends the whole process at once, reporting code to its parent.
Every thread stops. Nothing is flushed, unwound or destroyed: the system reclaims memory and descriptors, and data
still buffered in the process is lost, so flush what must be written first. On the Unix systems the parent sees
only the low eight bits of code; on Windows it sees all thirty-two. Does not return.
Parameters
| Name | Type | Description |
|---|---|---|
code | int32 | the status to report, zero for success by convention |
CurrentId
pub func CurrentId() -> uint32
The identifier the system gave this process. Stable for the life of the process and unique among running processes, but reused once the process has exited. Cannot fail and allocates nothing.
Returns: the process identifier