Instead of hardcoding exit codes (such as 1, 15, 111, 123, 124), I've replaced them with the exit codes from errno.h, signal.h, and stdlib.h. This relates the exit codes to established standards.
Comments
For the exit code on line 458, instead of exiting with exit code 0, which indicates a success, I changed it to exit with ENODEV which corresponds with No such device since the reason for exiting is Could not invoke nvidia-smi, no temps available which indicates that there is no GPU device(s) for GPU Burn.
Test Plan
Ran GPU Burn several times with several flags on a machine with GPUs.
Summary
Instead of hardcoding exit codes (such as
1
,15
,111
,123
,124
), I've replaced them with the exit codes fromerrno.h
,signal.h
, andstdlib.h
. This relates the exit codes to established standards.Comments
For the exit code on line 458, instead of exiting with exit code 0, which indicates a success, I changed it to exit with
ENODEV
which corresponds withNo such device
since the reason for exiting isCould not invoke nvidia-smi, no temps available
which indicates that there is no GPU device(s) for GPU Burn.Test Plan
Ran GPU Burn several times with several flags on a machine with GPUs.