From: Guy Harris Date: Thu, 31 Aug 2017 04:53:12 +0000 (-0700) Subject: Report *all* non-zero exit codes from the tcpdump command. X-Git-Tag: tcpdump-4.99-bp~2008 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/a02b7aa397bff829df86fe9f26b938e333659daa Report *all* non-zero exit codes from the tcpdump command. That will report, for example, exit code 139, which is issued for SIGSEGV crashes. --- diff --git a/tests/TESTonce b/tests/TESTonce index 012364fc..7026624b 100755 --- a/tests/TESTonce +++ b/tests/TESTonce @@ -22,8 +22,8 @@ else { # we used to do this as a nice pipeline, but the problem is that $r fails to # to be set properly if the tcpdump core dumps. $r = system "../tcpdump 2>/dev/null -n -t -r $input $options >NEW/$output"; - if($r == 0x100) { - # this means tcpdump exited with code 1. + if($r != 0) { + # this means tcpdump failed. open(OUTPUT, ">>"."NEW/$output") || die "fail to open $output\n"; printf OUTPUT "EXIT CODE %08x\n", $r; close(OUTPUT);