diff options
Diffstat (limited to 'usr.bin/aucat/file.c')
-rw-r--r-- | usr.bin/aucat/file.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/usr.bin/aucat/file.c b/usr.bin/aucat/file.c index 4172325ec10..497a456fa25 100644 --- a/usr.bin/aucat/file.c +++ b/usr.bin/aucat/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.17 2010/04/03 17:59:17 ratchov Exp $ */ +/* $OpenBSD: file.c,v 1.18 2010/04/06 20:07:01 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -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 @@ filelist_done(void) 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 @@ file_close(struct file *f) 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) { |