X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8eb218c755933bf68410da98ca311017b9d43fa6..b71c02f6b36c11c1e9d1ef5e8855f31965d3298b:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index 66d81bbf..a4e8bf5a 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -1214,8 +1214,8 @@ main(int argc, char **argv) * Print a message to the standard error on Windows. * XXX - why do it here, with a different message? */ - if(strlen(device) == 1) //we assume that an ASCII string is always longer than 1 char - { //a Unicode string has a \0 as second byte (so strlen() is 1) + if(strlen(device) == 1) /* we assume that an ASCII string is always longer than 1 char */ + { /* a Unicode string has a \0 as second byte (so strlen() is 1) */ fprintf(stderr, "%s: listening on %ws\n", program_name, device); } else @@ -1545,6 +1545,14 @@ main(int argc, char **argv) } (void)fflush(stdout); } + if (status == -2) { + /* + * We got interrupted. If we are reading multiple + * files (via -V) set these so that we stop. + */ + VFileName = NULL; + ret = NULL; + } if (status == -1) { /* * Error. Report it.