5 ms·
In reliability theory "X failed" is a poor error message. What we want to know is which failure mode has been triggered. The function of kill is to kill a give
by SixSigma 11y ago
In reliability theory "X failed" is a poor error message. What we want to know is which failure mode has been triggered.
The function of kill is to kill a given pid, so there are two failure modes : "the pid didn't exist" or "the pid didn't die"
- LukeShu 11y agoIt's poorly named, because the function of kill isn't to kill a given PID; it's to send a signal to a given PID.
- meanary 11y agoIs there a logology/discipline where error messages are treated to medical-legal terminology?
- SixSigma 11y agoI got exposed to reliability theory in Logistics Engineering. Mostly: Reliability Centered Maintenance https://en.wikipedia.org/wiki/Reliability-centered_maintenance https://en.wikipedia.org/wiki/Reliability-centered_maintenan...
- Sean1708 11y ago"kill failed" isn't actually the message which is printed. What you get is thread '<main>' panicked at 'kill failed: Sys(ESRCH)', ../src/libcore/result.rs:746 So you know that it failed because of ESRCH (no such process).
- SixSigma 11y agoAh, that makes much more sense, thanks
- masklinn 11y ago> The function of kill is to kill a given pid 1. there are more failure modes than these (POSIX kill(2) can set 3 different errnos) 2. kill(2) signals process, it doesn't usually kill them (let alone kill them outright in such a way that this information could ever be returned) 3. kill(2) can signal process sets of cardinality > 1 4. the `unwrap` panic message will print the unwrapped value, which includes the ERRNO
- realusername 11y agokill(2) unlike it's name actually sends any signal to a pid, not only SIGKILL. Other signals are used for various purpose. SIGINT is for example used when using Ctrl-C on a terminal.