Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/kqueue]: src/sys/kern improve previous - don't try to do anything if the...
details: https://anonhg.NetBSD.org/src/rev/4a3fbee9170d
branches: kqueue
changeset: 512504:4a3fbee9170d
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Sep 22 08:37:32 2002 +0000
description:
improve previous - don't try to do anything if the 'read' end of pipe
is already closed, pipe_peer is NULL in that case
diffstat:
sys/kern/sys_pipe.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 46036b6951c6 -r 4a3fbee9170d sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c Sat Sep 21 19:50:44 2002 +0000
+++ b/sys/kern/sys_pipe.c Sun Sep 22 08:37:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_pipe.c,v 1.5.2.9 2002/09/21 19:40:35 jdolecek Exp $ */
+/* $NetBSD: sys_pipe.c,v 1.5.2.10 2002/09/22 08:37:32 jdolecek Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.5.2.9 2002/09/21 19:40:35 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.5.2.10 2002/09/22 08:37:32 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1910,6 +1910,11 @@
case EVFILT_WRITE:
/* need the peer structure, not our own */
cpipe = cpipe->pipe_peer;
+
+ /* if reader end already closed, just return */
+ if (!cpipe)
+ return;
+
break;
default:
/* nothing to do */
Home |
Main Index |
Thread Index |
Old Index