Replace nix process functions with rustix equivalents:
- geteuid/getegid/getuid/getgid/getpid/getpgrp/getsid -> rustix::process
- kill/test_kill -> rustix::process::kill_process/test_kill_process
- Signal::try_from -> signal_from_raw helper using from_raw_unchecked
- SigHandler for send_signal_group -> csignal wrapper
The getsid return type changes from Result<pid_t, Errno> to
io::Result<pid_t>, which is more idiomatic.
Replace nix pipe/splice/vmsplice wrappers with rustix equivalents
in uucore's pipes module. Also migrate cat's splice.rs to use
rustix::io::{read, write} instead of nix::unistd.
The return types change from nix::Result to std::io::Result, which
is more idiomatic and compatible with the broader ecosystem.
* cksum: fix parsing error with tagged cheksum files
When passed the '-c'/'--check' flag, and parsing a checksum file in
the "tagged" format, cksum (symlinked to sha256sum, etc...) expects a
line that looks like this:
ShA256 (file.bin) = da39a3ee5e6b4b0d3255bfef95601890afd80709
If the hash algorithm at the beginning of the line (in the above case
SHA256) is missing, then cksum panics because it is attempts to use the
value of an array at index -1. This fix causes cksum to instead consider
the line a syntax error and ignore it, just as GNU cksum does. I also
added unit and integration tests to check for the above behaviour.
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>