]> git.ipfire.org Git - thirdparty/mtr.git/commit
ui: make interactive and non-interactive exit code the same 447/head
authorSami Kerola <kerolasa@iki.fi>
Tue, 6 Sep 2022 13:16:04 +0000 (14:16 +0100)
committerSami Kerola <kerolasa@iki.fi>
Tue, 6 Sep 2022 13:40:12 +0000 (14:40 +0100)
commitd2a29fffb434ef5561e309ee2686d9de1f7f7338
tree88246a110b01cb79e88f060527cc88766e3bcece
parentef5c161ceed624b639314e8a185cf727e54c48f0
ui: make interactive and non-interactive exit code the same

Before this change the report gave successful exit value when destination
hostname could not be found.

    $ ./mtr --report nxdomain. ; echo $?
    ./mtr: Failed to resolve host: nxdomain.: Name or service not known
    0

Quickly looking 'git grep ---after-context if.*Interactive' there does not
appear to be more than the two instances in main() where exit is called
depending on interactive, so this change should cover all these cases.

Reported-by: Marek Kroemeke <mkroemeke@cloudflare.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
ui/mtr.c