Exit codes for process termination
i32
newtype for exit codes
main
, std::process
, and std::io::Error
Add to your Cargo.toml
:
toml
[dependencies]
proc-exit = "1.0.1"
Feature flags:
- portable
: Coerce exit codes to u8
for consistent, cross-platform, behavior
Other crates that might be useful in testing command line programs.
- duct for orchestrating multiple processes.
- or commandspec for easier writing of commands
- rexpect for controlling interactive programs.
- assert_cmd
can be reused to simplify controlling CLIs
Some crates that fill a similar role include:
- sysexit
- Uses an enum, making certain states unpresentable
- Includes signals
- Integrates with std::process
and std::io::Error
- Doesn't integrate with main
- exit-code
- i32
constants and helper methods
- Doesn't include signals
- Doesn't integrate with main
, std::process
, or std::io::Error
- exitcode
- i32
constants and helper methods
- Doesn't include signals
- Doesn't integrate with main
, std::process
, or std::io::Error
- exitfailure
- Allows Display
able errors to be used with ?
in main()
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.