]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Noted effect of fork() and execve().
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 22 Jul 2006 14:21:39 +0000 (14:21 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 22 Jul 2006 14:21:39 +0000 (14:21 +0000)
man2/chdir.2

index 9f930dd7d890da0318dd5163e683ca1410e577c6..ddbc037f462ddfd50784f12fe504617973c71274 100644 (file)
@@ -41,7 +41,7 @@ chdir, fchdir \- change working directory
 .BI "int fchdir(int " fd );
 .SH DESCRIPTION
 .BR chdir ()
-changes the current directory to that specified in
+changes the current working directory to that specified in
 .IR path .
 .PP
 .BR fchdir ()
@@ -60,7 +60,8 @@ general errors for
 are listed below:
 .TP
 .B EACCES
-Search permission is denied for one of the directories in the path prefix of
+Search permission is denied for one of the directories 
+in the path prefix of
 .IR path .
 (See also
 .BR path_resolution (2).)
@@ -103,6 +104,12 @@ Search permission was denied on the directory open on
 .I fd
 is not a valid file descriptor.
 .SH NOTES
+A child process created via
+.BR fork (2)
+inherits its parent's current working directory.
+The current working directory is left unchanged by
+.BR execve (2).
+
 The prototype for
 .BR fchdir ()
 is only available if
@@ -111,7 +118,8 @@ is defined.
 .SH "CONFORMING TO"
 The 
 .BR chdir ()
-call is compatible with SVr4, SVID, POSIX, X/OPEN, 4.4BSD.  SVr4 documents
+call is compatible with SVr4, SVID, POSIX, X/OPEN, 4.4BSD.  
+SVr4 documents
 additional EINTR, ENOLINK, and EMULTIHOP error conditions but has
 no ENOMEM.  POSIX.1 does not have ENOMEM or ELOOP error conditions.
 X/OPEN does not have EFAULT, ENOMEM or EIO error conditions.