summaryrefslogtreecommitdiffstats
path: root/procname.c
diff options
context:
space:
mode:
authornicm <nicm>2013-10-10 12:39:24 +0000
committernicm <nicm>2013-10-10 12:39:24 +0000
commitd0566a474aa43cb27c6a8fc62ff80ef32c7fe86e (patch)
treee6a704dab1efe06c40d2efe40df990665777d0cb /procname.c
parent99e3cbc526cff605f32d61c0b4be77a8b2dbaa9f (diff)
Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).
Diffstat (limited to 'procname.c')
-rw-r--r--procname.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/procname.c b/procname.c
index 1518c94b..ee9b99dc 100644
--- a/procname.c
+++ b/procname.c
@@ -37,7 +37,6 @@
struct kinfo_proc *cmp_procs(struct kinfo_proc *, struct kinfo_proc *);
char *get_proc_name(int, char *);
-char *get_proc_cwd(int);
struct kinfo_proc *
cmp_procs(struct kinfo_proc *p1, struct kinfo_proc *p2)
@@ -132,17 +131,3 @@ error:
free(buf);
return (NULL);
}
-
-char*
-get_proc_cwd(int fd)
-{
- int name[] = { CTL_KERN, KERN_PROC_CWD, 0 };
- static char path[MAXPATHLEN];
- size_t pathlen = sizeof path;
-
- if ((name[2] = tcgetpgrp(fd)) == -1)
- return (NULL);
- if (sysctl(name, 3, path, &pathlen, NULL, 0) != 0)
- return (NULL);
- return (path);
-}