Wireshark-bugs: [Wireshark-bugs] [Bug 8609] Redirection of "wireshark.exe -D" to a text file is

Date: Fri, 26 Apr 2013 22:08:28 +0000

Comment # 18 on bug 8609 from
(In reply to comment #16)
> Any idea why, when you run "wireshark -D" from cmd.exe, the command prompt
> isn't displayed again until you hit <enter>,

I think you'll find it *is* displayed in cmd.exe - *before* the output from
"wireshark -D".  I'm guessing that cmd.exe somehow finds out that wireshark.exe
is a Windows-subsystem executable and doesn't bother waiting for it to
complete.  (Or perhaps that happens somewhere in the Win32 subsystem, e.g. in
csrss.)

You could do "start/wait wireshark -D" to force cmd.exe to wait for Wireshark
to exit.

> whereas if you run it from cygwin, the prompt is displayed?

Cygwin's terminal emulator (or its implementation of fork()/vfork() and the
exec calls) probably don't treat Windows-subsystem executables differently from
console-subsystem executables, except when necessary to work around Windows
treating them differently.

That means that, among other things, it waits for it to complete, and only
issues the prompt then, so it shows up *after* the output of "wireshark -D".

> And you also get the "Capture-Message: Capture Interface List ..." with
> cygwin, but not with cmd.exe.

*That* I'm not sure of.  It shouldn't be popping up unless you've cranked the
log level up.

(In reply to comment #17)
> And, if you run it from a cygwin bash shell started within a cmd.exe process,
> you get the prompt back correctly, but still no "Capture-Message" message...

You get the prompt after the output, rather than before it, because it's Bash
and thus will wait for the process to finish even if it happens to be running a
Windows-subsystem program.

Why you don't get the "Capture-Message" message is another matter.  I don't
know what part of cmd.exe or the Win32 subsystem is responsible for
disconnecting newly-created processes from a terminal; I guess that's happening
here even though it's being run from Bash.


You are receiving this mail because:
  • You are watching all bug changes.