summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlum <lum@openbsd.org>2016-01-03 19:37:08 +0000
committerlum <lum@openbsd.org>2016-01-03 19:37:08 +0000
commita7e48a0ba6f2f689ec6c89fbe3da59a72ab835f0 (patch)
tree2791834beca8d4665506cab056aa446ba9c98c45
parentFix description of fuser -u: what's usually reported in brackets is the (diff)
downloadwireguard-openbsd-a7e48a0ba6f2f689ec6c89fbe3da59a72ab835f0.tar.xz
wireguard-openbsd-a7e48a0ba6f2f689ec6c89fbe3da59a72ab835f0.zip
Allow macro execution to continue without delay in the event of a
visble bell call.
-rw-r--r--usr.bin/mg/bell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mg/bell.c b/usr.bin/mg/bell.c
index 3ee30cf1fe2..7c1753d797c 100644
--- a/usr.bin/mg/bell.c
+++ b/usr.bin/mg/bell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bell.c,v 1.3 2015/03/19 21:22:15 bcallah Exp $ */
+/* $OpenBSD: bell.c,v 1.4 2016/01/03 19:37:08 lum Exp $ */
/*
* This file is in the public domain.
@@ -17,6 +17,7 @@
#include <unistd.h>
#include "def.h"
+#include "macro.h"
void
bellinit(void)
@@ -34,6 +35,8 @@ dobeep(void)
if (dovisiblebell) {
sgarbf = TRUE;
update(CNONE);
+ if (inmacro) /* avoid delaying macro execution. */
+ return;
usleep(50000);
}
}