From owner-freebsd-bugs Mon Mar 3 00:00:09 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA09520 for bugs-outgoing; Mon, 3 Mar 1997 00:00:09 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA09499; Mon, 3 Mar 1997 00:00:04 -0800 (PST) Resent-Date: Mon, 3 Mar 1997 00:00:04 -0800 (PST) Resent-Message-Id: <199703030800.AAA09499@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:(from nobody@localhost) by.freefall.freebsd.org.id.XAA08903;Sun; (8.8.5/8.8.5);, 2 Mar 1997 23:53:50.-0800 (PST) Message-Id: <199703030753.XAA08903@freefall.freebsd.org> Date: Sun, 2 Mar 1997 23:53:50 -0800 (PST) From: sef@kithrup.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: i386/2853: syscons beeps even if beeping screen is not active Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2853 >Category: i386 >Synopsis: syscons beeps even if beeping screen is not active >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 3 00:00:01 PST 1997 >Last-Modified: >Originator: Sean Eric Fagan >Organization: Kithrup Enterprises, Ltd. >Release: 2.2-970212-GAMMA >Environment: FreeBSD garth.kithrup.com 2.2-970212-GAMMA FreeBSD 2.2-970212-GAMMA #0: Sat Mar 1 20:40:41 PST 1997 root@garth.kithrup.com:/usr/src/sys/compile/GARTH i386 >Description: For some unfathomable reason, syscons had been changed to always beep, even when the beeping terminal is not currently displayed. This is annoying (part of the reason to change screens is to get away from any annoying output that screen my display), different from the SCO model (which only beeps if the screen is active), and potentially very annoying (write a program that beeps continuously, then switch screens). >How-To-Repeat: One screen one: sleep 2 ; echo ^g Switch to screen two. Enjoy the beep. >Fix: Simplest fix: diff -u -r1.1.1.1 syscons.c --- syscons.c 1997/03/01 02:57:01 1.1.1.1 +++ syscons.c 1997/03/03 07:51:21 @@ -3620,9 +3620,8 @@ blink_screen(cur_console); timeout((timeout_func_t)blink_screen, cur_console, hz/10); } else { - if (scp != cur_console) - pitch *= 2; - sysbeep(pitch, duration); + if (scp == cur_console) + sysbeep(pitch, duration); } } More complete fix: diff -u -r1.1.1.1 syscons.c --- syscons.c 1997/03/01 02:57:01 1.1.1.1 +++ syscons.c 1997/03/03 07:52:51 @@ -3620,9 +3620,14 @@ blink_screen(cur_console); timeout((timeout_func_t)blink_screen, cur_console, hz/10); } else { +#ifdef SC_SANE_BEEP + if (scp == cur_console) + sysbeep(pitch, duration); +#else if (scp != cur_console) pitch *= 2; sysbeep(pitch, duration); +#endif } } A more complete fix would use sysctl, which I do not currently know well-enough to write at the moment. >Audit-Trail: >Unformatted: