This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=55529a094e8a8b847f140b9d5c7ab6d6745d4dbd

commit 55529a094e8a8b847f140b9d5c7ab6d6745d4dbd
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Jan 4 21:57:33 2026 +0100

    s-s-d: Check for invalid combinations of --notify-await options
    
    The --notify-await option only makes sense with --background, and the
    --notify-timeout option only makes sense with --notify-await. Check
    that and error out otherwise.
    
    Closes: #1124643
---
 utils/start-stop-daemon.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 68041a1af..4559accc9 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1561,10 +1561,15 @@ parse_options(int argc, char * const *argv)
        if (background && action != ACTION_START)
                badusage("--background is only relevant with --start");
 
+       if (notify_timeout_str && !notify_await)
+               badusage("--notify-timeout is only relevant with 
--notify-await");
+
        if (!close_io && !background)
                badusage("--no-close is only relevant with --background");
        if (output_io && !background)
                badusage("--output is only relevant with --background");
+       if (notify_await && !background)
+               badusage("--notify-await is only relevant with --background");
 
        if (close_io && output_io == NULL)
                output_io = "/dev/null";

-- 
Dpkg.Org's dpkg

Reply via email to