Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libkvm in kvm_getprocs(), check for error from kvm_deadp...
details: https://anonhg.NetBSD.org/src/rev/54d5565de5ce
branches: trunk
changeset: 480560:54d5565de5ce
user: chs <chs%NetBSD.org@localhost>
date: Sat Jan 15 19:16:32 2000 +0000
description:
in kvm_getprocs(), check for error from kvm_deadprocs().
diffstat:
lib/libkvm/kvm_proc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r e4cf2c5ebc6f -r 54d5565de5ce lib/libkvm/kvm_proc.c
--- a/lib/libkvm/kvm_proc.c Sat Jan 15 18:39:31 2000 +0000
+++ b/lib/libkvm/kvm_proc.c Sat Jan 15 19:16:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm_proc.c,v 1.31 1999/07/02 15:28:50 simonb Exp $ */
+/* $NetBSD: kvm_proc.c,v 1.32 2000/01/15 19:16:32 chs Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
-__RCSID("$NetBSD: kvm_proc.c,v 1.31 1999/07/02 15:28:50 simonb Exp $");
+__RCSID("$NetBSD: kvm_proc.c,v 1.32 2000/01/15 19:16:32 chs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -468,6 +468,8 @@
nprocs = kvm_deadprocs(kd, op, arg, nl[1].n_value,
nl[2].n_value, nl[3].n_value, nprocs);
+ if (nprocs < 0)
+ return (0);
#ifdef notdef
size = nprocs * sizeof(struct kinfo_proc);
(void)realloc(kd->procbase, size);
Home |
Main Index |
Thread Index |
Old Index