Reputation: 96615
In the current version of Rust (1.43) what exit code does a program produce if you return an Err
from main()
?
Upvotes: 0
Views: 1050
Reputation: 42332
The Termination trait is used to get an exit code from whatever main
returns. The existing implementations wrap libc's EXIT_SUCCESS
or EXIT_FAILURE
which... are implementation-defined. But on unix-like systems they're probably 0
and 1
.
Upvotes: 3