1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

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.
This commit is contained in:
ratchov 2008-11-11 12:56:02 +00:00
parent 5ce1c1ef84
commit 5e429d4b6c
2 changed files with 7 additions and 3 deletions

View File

@ -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);

View File

@ -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