summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2025-01-19 16:31:34 -0800
committerVito Caputo <vcaputo@pengaru.com>2025-01-19 16:31:34 -0800
commite0fa20239b0220906ed72f5cdd96c9940d4cd5c9 (patch)
tree66474c542b0255f7754d021cc88f26322daaab15 /src
parent7cd729ec78f03485e040b13a9336ba5283d51fe9 (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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vmon.c b/src/vmon.c
index 927323b..6a08a14 100644
--- a/src/vmon.c
+++ b/src/vmon.c
@@ -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:
© All Rights Reserved