=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/Attic/midi.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- src/usr.bin/aucat/Attic/midi.c 2010/10/21 19:10:52 1.30 +++ src/usr.bin/aucat/Attic/midi.c 2010/11/14 13:51:27 1.31 @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.30 2010/10/21 19:10:52 ratchov Exp $ */ +/* $OpenBSD: midi.c,v 1.31 2010/11/14 13:51:27 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -271,13 +271,17 @@ { if (!(p->flags & APROC_QUIT)) return; - if (LIST_EMPTY(&p->ins)) + if (LIST_EMPTY(&p->ins) || LIST_EMPTY(&p->outs)) aproc_del(p); } void thru_hup(struct aproc *p, struct abuf *obuf) { + if (!(p->flags & APROC_QUIT)) + return; + if (LIST_EMPTY(&p->outs)) + aproc_del(p); } void