summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-11-11 12:56:03 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-11-11 12:56:03 +0000
commit6ded11df2bec40fb5c723cb16cd840d0a6a45c17 (patch)
tree4b717bf6e9c1fdf69aa8f7f242df63c7a3b461cb /usr.bin/aucat
parentb8f784bf1eb633ab43cad195630096d79683f261 (diff)
when not in server mode, aucat terminates automatically using
the {MIX,SUB}_AUTAQUIT features. In this case we're not allowed to directly touch dev_mix and dev_sub because they can disappar. So disable the ``suspend'' and ``quit'' bits when {MIX,SUB}_AUTAQUIT are used.
Diffstat (limited to 'usr.bin/aucat')
-rw-r--r--usr.bin/aucat/aucat.c7
-rw-r--r--usr.bin/aucat/dev.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index c3e65334a0d..2c1a5a5ffd7 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.35 2008/11/10 23:25:37 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.36 2008/11/11 12:56:02 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -502,6 +502,8 @@ main(int argc, char **argv)
}
if (!file_poll())
break;
+ if (!l_flag)
+ continue;
if ((!dev_mix || dev_mix->u.mix.idle > 2 * dev_bufsz) &&
(!dev_sub || dev_sub->u.sub.idle > 2 * dev_bufsz)) {
if (!suspend) {
@@ -525,7 +527,8 @@ main(int argc, char **argv)
suspend = 0;
dev_start();
}
- dev_done();
+ if (l_flag)
+ dev_done();
filelist_done();
sigfillset(&sa.sa_mask);
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c
index d4c418ac118..c0443783bb7 100644
--- a/usr.bin/aucat/dev.c
+++ b/usr.bin/aucat/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.14 2008/11/10 23:25:37 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.15 2008/11/11 12:56:02 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -227,6 +227,7 @@ dev_done(void)
{
struct file *f;
+ DPRINTF("dev_done: dev_mix = %p, dev_sub = %p\n", dev_mix, dev_sub);
if (dev_mix) {
/*
* generate EOF on all inputs (but not the device), and