check_lp.hpp file
Utility for running gtopt_check_lp diagnostics on error LP files.
Provides run_check_lp_diagnostic() which looks for the gtopt_check_lp script on PATH and, if found, spawns it directly via posix_spawn (no shell) with --quiet --no-color, returning the captured output for logging.
Provides run_check_json_info() which looks for the gtopt_check_json script on PATH and, if found, spawns it directly via posix_spawn (no shell) with --info --no-color, writing the statistics to the inherited stdout/stderr. Returns true on success (exit 0).
Both helpers use the same posix_spawn infrastructure: no shell is invoked, there is no shell-injection surface, and an optional timeout wrapper prevents indefinite hangs.
The --quiet flag makes gtopt_check_lp:
- never fail (always exits with code 0),
- never block for user input,
- try every available local solver and optionally NEOS,
- warn instead of error on missing config, missing LP file, or solver failures.
Namespaces
- namespace gtopt