=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/Attic/file.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- src/usr.bin/aucat/Attic/file.c 2010/01/10 21:47:41 1.15 +++ src/usr.bin/aucat/Attic/file.c 2010/04/03 17:40:33 1.16 @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.15 2010/01/10 21:47:41 ratchov Exp $ */ +/* $OpenBSD: file.c,v 1.16 2010/04/03 17:40:33 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -63,8 +63,6 @@ #define MAXFDS 100 -extern struct fileops listen_ops, pipe_ops; - struct timeval file_tv; struct filelist file_list; struct timo *timo_queue; @@ -520,23 +518,6 @@ timo_done(); } -/* - * Close all listening sockets. - * - * XXX: remove this - */ -void -filelist_unlisten(void) -{ - struct file *f, *fnext; - - for (f = LIST_FIRST(&file_list); f != NULL; f = fnext) { - fnext = LIST_NEXT(f, entry); - if (f->ops == &listen_ops) - file_del(f); - } -} - unsigned file_read(struct file *f, unsigned char *data, unsigned count) { @@ -676,6 +657,8 @@ dbg_puts(": closing\n"); } #endif + if (f->wproc == NULL && f->rproc == NULL) + f->state |= FILE_ZOMB; if (!(f->state & (FILE_RINUSE | FILE_WINUSE))) { p = f->rproc; if (p) {