diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2025-01-19 16:31:34 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2025-01-19 16:31:34 -0800 |
commit | e0fa20239b0220906ed72f5cdd96c9940d4cd5c9 (patch) | |
tree | 66474c542b0255f7754d021cc88f26322daaab15 /src | |
parent | 7cd729ec78f03485e040b13a9336ba5283d51fe9 (diff) |
vmon: add some sanity checks for weird flag combinations
These are just some potentially helpful warnings, they're not
treated as fatal... just informative regarding somewhat obviously
confused combinations.
Diffstat (limited to 'src')
-rw-r--r-- | src/vmon.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -731,6 +731,14 @@ static vmon_t * vmon_startup(int argc, const char * const *argv) } } + /* lets do some sanity checks; don't fail, but speak up, since I'm not interested */ + if (vmon->headless && vmon->linger) + VWM_ERROR("FYI: combining --headless and --linger likely doesn't make sense"); + + if (vmon->reaper && !vmon->execv) + VWM_ERROR("FYI: using --reaper without a command (e.g. w/--pid or the default '--pid 1' equiv) likely doesn't make sense"); + + return vmon; _err_win: |