View Issue Details

IDProjectCategoryView StatusLast Update
0003138Far ManagerCommand Line/Executepublic2019-02-22 08:06
Reportertheultramage Assigned To 
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionreopened 
Platformx64OSWindowsOS Version7
Product Version3.0 
Summary0003138: unable to stop the beeping after accidentally dumping a binary file into the console
DescriptionSometimes I accidentally run a command that echoes the contents of a large binary file into the Far Manager console. In text mode, the byte value 0x07 is interpreted as a 'beep' character, and there are a lot of them. While this is happening, the Far window stops responding, so I can't use Ctrl+C to make it stop. I have to stop the program and start a new instance.
Steps To Reproducefc.exe kernel32.dll user32.dll
TagsConsole
Build0

Activities

DrKnS

2015-12-20 08:26

administrator   bugnote:0014150

So?...
Far doesn't beep itself, console host does.

You can type "net stop beep" or "sc stop beep" in elevated console to stop that.

theultramage

2015-12-20 08:34

reporter   bugnote:0014151

The point is not the beeping, the point is that Far becomes unresponsive while it's happening. If I echo a 50-meg text file, I can ctrl-c out of it at any time. I suggest checking if there isn't some trivial way to mitigate this, say for example some winapi toggle. This is a super-ancient issue so I assume programmers using the windows console must have already figured it out.

PS: Beep is a non-PnP device driver, does not like being told to stop, and requires a reboot to make it work again. I do confirm that it is possible to ctrl-c while the driver is disabled.

DrKnS

2015-12-20 09:24

administrator   bugnote:0014152

Yes, there is a flag of SetConsoleMode function, ENABLE_PROCESSED_OUTPUT:
Characters written by the WriteFile or WriteConsole function or echoed by the ReadFile or ReadConsole function are examined for ASCII control sequences and the correct action is performed. Backspace, tab, bell, carriage return, and line feed characters are processed.

But it makes no difference for us: when you do "type binary.exe" it's processed by cmd.exe, which sets its own mode (including the flag above) anyway.

JohnDoe

2019-02-22 07:35

updater   bugnote:0016462

Shouldn't we close this issue?

Issue History

Date Modified Username Field Change
2015-12-20 07:57 theultramage New Issue
2015-12-20 08:26 DrKnS Note Added: 0014150
2015-12-20 08:26 DrKnS Build => 0
2015-12-20 08:26 DrKnS Status new => closed
2015-12-20 08:26 DrKnS Resolution open => no change required
2015-12-20 08:34 theultramage Note Added: 0014151
2015-12-20 08:34 theultramage Status closed => feedback
2015-12-20 08:34 theultramage Resolution no change required => reopened
2015-12-20 09:24 DrKnS Note Added: 0014152
2019-02-22 07:35 JohnDoe Note Added: 0016462
2019-02-22 07:39 JohnDoe Tag Attached: Console
2019-02-22 08:06 DrKnS Status feedback => closed