NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xsrc/54245: xset(1): bell duration 0 is infinite
>Number: 54245
>Category: xsrc
>Synopsis: xset(1): bell duration 0 is infinite
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: xsrc-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 29 00:15:00 +0000 2019
>Originator: David Holland
>Release: NetBSD 8.99.41 (20190528)
>Organization:
>Environment:
System: NetBSD macaran 8.99.41 NetBSD 8.99.41 (MACARAN) #54: Tue May 28 18:10:56 EDT 2019 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:
I discovered today while tinkering with a different problem (see other
PR) that if you do "xset b <volume> <pitch> 0", and then beep, this
means a beep that lasts forever and cannot, apparently, be stopped in
any obvious way.
This is probably upstream's bug, but we can probably afford to carry a
one-line patch to reject duration 0.
>How-To-Repeat:
As above.
>Fix:
Something like this?
Index: external/mit/xset/dist/xset.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xset/dist/xset.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 xset.c
--- external/mit/xset/dist/xset.c 11 Mar 2018 08:53:18 -0000 1.1.1.7
+++ external/mit/xset/dist/xset.c 29 May 2019 00:08:58 -0000
@@ -265,7 +265,7 @@
i++;
arg = nextarg(i, argv);
- if (is_number(arg, 32767)) { /* If duration is given: */
+ if (is_number(arg, 32767) && atoi(arg) > 0) { /* If duration is given: */
set_bell_dur(dpy, atoi(arg)); /* set the bell. */
i++;
}
Home |
Main Index |
Thread Index |
Old Index