prevent perror() call if kvm_open fails
This commit is contained in:
parent
1a0c381c58
commit
59eb92f4ce
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue