summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-12-09 16:14:55 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-12-09 16:14:55 +0000
commitecfc9ea17f4367f9c343158f113414a32b6239cd (patch)
tree8f80a882323bda5043462fe0d91f4e31b2d1cc87 /lib/libc
parent44703bd43ff60c01ccd8eb65be09de5d9ec38672 (diff)
Add new KERN_PROC_CWD sysctl to get the current working directory of a process.
ok guenther deraadt
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/sysctl.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 0c0f7090c94..e9bed504790 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.3,v 1.209 2011/09/25 17:48:17 jmc Exp $
+.\" $OpenBSD: sysctl.3,v 1.210 2011/12/09 16:14:54 nicm Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 25 2011 $
+.Dd $Mdocdate: December 9 2011 $
.Dt SYSCTL 3
.Os
.Sh NAME
@@ -458,6 +458,7 @@ information.
.It Dv KERN_POSIX1 Ta "integer" Ta "no"
.It Dv KERN_PROC Ta "struct kinfo_proc" Ta "no"
.It Dv KERN_PROC_ARGS Ta "node" Ta "not applicable"
+.It Dv KERN_PROC_CWD Ta "string" Ta "not applicable"
.It Dv KERN_PROF Ta "node" Ta "not applicable"
.It Dv KERN_RAWPARTITION Ta "integer" Ta "no"
.It Dv KERN_RND Ta "struct rndstats" Ta "no"
@@ -762,6 +763,10 @@ followed by the strings themselves.
The last char pointer is a
.Dv NULL
pointer.
+.It Dv KERN_PROC_CWD
+Return the current working directory of a process.
+The third level name is the target process ID.
+A NUL-terminated string is returned.
.It Dv KERN_PROF
Return profiling information about the kernel.
If the kernel is not compiled for profiling,