summaryrefslogtreecommitdiff
path: root/psutil/_psutil_bsd.c
diff options
context:
space:
mode:
authorKamil Rytarowski <krytarowski@users.noreply.github.com>2019-06-12 06:38:40 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2019-06-12 12:38:40 +0800
commitc2f30702a4db0f4dfbf88842c07532cc187daf5a (patch)
tree3289f4c5072e1b75a8e93353b08f3b46dbd185ec /psutil/_psutil_bsd.c
parentf50df9657591c52a0a46c5af3d14998c6471065f (diff)
downloadpsutil-c2f30702a4db0f4dfbf88842c07532cc187daf5a.tar.gz
Implement psutil_proc_cwd for NetBSD (#1530)
Pick KERN_PROC_CWD that is available in 8.99.43 and fallback for older versions to readlink("/proc/$PID/cwd").
Diffstat (limited to 'psutil/_psutil_bsd.c')
-rw-r--r--psutil/_psutil_bsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c
index 0f899ef5..74fe5922 100644
--- a/psutil/_psutil_bsd.c
+++ b/psutil/_psutil_bsd.c
@@ -921,9 +921,9 @@ PsutilMethods[] = {
#if defined(PSUTIL_FREEBSD) || defined(PSUTIL_OPENBSD)
{"proc_connections", psutil_proc_connections, METH_VARARGS,
"Return connections opened by process"},
+#endif
{"proc_cwd", psutil_proc_cwd, METH_VARARGS,
"Return process current working directory."},
-#endif
#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 || PSUTIL_OPENBSD || defined(PSUTIL_NETBSD)
{"proc_num_fds", psutil_proc_num_fds, METH_VARARGS,
"Return the number of file descriptors opened by this process"},