summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/aucat/file.c')
-rw-r--r--usr.bin/aucat/file.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/usr.bin/aucat/file.c b/usr.bin/aucat/file.c
index e60f1154e15..af37e199fa0 100644
--- a/usr.bin/aucat/file.c
+++ b/usr.bin/aucat/file.c
@@ -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 <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) {