Hello,
on OpenBSD (and presumably on NetBSD) kvm_open() fails when it's
called as regular user with flags other than KVM_NO_FILES.

Because uwsgi doesn't use this special flag, VSZ and RSS sizes
are currently reported as 0 bytes on those systems.

Attached patch fixes this (tested only on OpenBSD).

Best regards,
Piotr Sikora < [email protected] >
--- logging.c.orig      Tue Jun  7 16:54:06 2011
+++ logging.c   Tue Jun  7 16:56:31 2011
@@ -173,6 +173,8 @@
 
 #if defined(__FreeBSD__)
        kv = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, NULL);
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
+       kv = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
 #else
        kv = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
 #endif
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to