Subject: many kvm functions returns 0 on errors.
To: None <tech-kern@NetBSD.ORG>
From: msaitoh <>
List: tech-kern
Date: 06/30/1998 00:14:00

 kvm_read(3) says:

 >    Upon success, the number of bytes actually transferred is returned.  Oth-
 >    erwise, -1 is returned.

but libkvm.c::kvm_read() returns 0. PR5242 says this.
The kvm_* manpages said that many kvm functions returns -1 on errors, but
actually returns 0.

 Both OpenBSD and FreeBSD is the same as NetBSD. Is this correct behavior?
I don't think so.

		SAITOH Masanobu (
		University of Electro-Communications