The auto-generated cmdliner documentation says:
124 on command line parsing errors.
We should define our own exit code, and document it: https://erratique.ch/software/cmdliner/doc/cookbook.html#cmds_exit_code_docs
Then we should use eval' instead of eval so that we can control the exitcode more directly: https://erratique.ch/software/cmdliner/doc/cookbook.html#cmds_which_eval
Currently we only have a Fail exception, but we should differentiate between wrong command-line arguments from the user (e.g. non-existent file path or PID), and something going wrong with the program at runtime (such as the newly fixed exitcode propagation #128, or not being able to attach to the ring buffer, etc.)
The auto-generated cmdliner documentation says:
We should define our own exit code, and document it: https://erratique.ch/software/cmdliner/doc/cookbook.html#cmds_exit_code_docs
Then we should use
eval'instead ofevalso that we can control the exitcode more directly: https://erratique.ch/software/cmdliner/doc/cookbook.html#cmds_which_evalCurrently we only have a
Failexception, but we should differentiate between wrong command-line arguments from the user (e.g. non-existent file path or PID), and something going wrong with the program at runtime (such as the newly fixed exitcode propagation #128, or not being able to attach to the ring buffer, etc.)