diff --git a/man2/chdir.2 b/man2/chdir.2 index 9f930dd7d..ddbc037f4 100644 --- a/man2/chdir.2 +++ b/man2/chdir.2 @@ -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.