prevent perror() call if kvm_open fails

This commit is contained in:
Doug MacEachern 2005-02-15 01:57:19 +00:00
parent 1a0c381c58
commit 59eb92f4ce
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ int sigar_os_open(sigar_t **sigar)
#ifdef DARWIN #ifdef DARWIN
(*sigar)->mach_port = mach_host_self(); (*sigar)->mach_port = mach_host_self();
#else #else
(*sigar)->kmem = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open"); (*sigar)->kmem = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
if (stat("/proc/curproc", &sb) < 0) { if (stat("/proc/curproc", &sb) < 0) {
(*sigar)->proc_mounted = 0; (*sigar)->proc_mounted = 0;
} }