]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Various improvements to DESCRIPTION.
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 25 Mar 2007 12:59:30 +0000 (12:59 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 25 Mar 2007 12:59:30 +0000 (12:59 +0000)
man2/rename.2

index f38157ec1cf703ffa69080a63051419e02b40b57..0c38d83d59671fca795f4af5f0357bb904ae1cd3 100644 (file)
@@ -27,6 +27,7 @@
 .\" Modified Sat Jul 24 00:35:52 1993 by Rik Faith <faith@cs.unc.edu>
 .\" Modified Thu Jun  4 12:21:13 1998 by Andries Brouwer <aeb@cwi.nl>
 .\" Modified Thu Mar  3 09:49:35 2005 by Michael Haardt <michael@moria.de>
+.\" 2007-03-25, mtk, added various text to DESCRIPTION.
 .\"
 .TH RENAME 2 1998-06-04 "Linux 2.0" "Linux Programmer's Manual"
 .SH NAME
@@ -38,10 +39,12 @@ rename \- change the name or location of a file
 .SH DESCRIPTION
 .BR rename ()
 renames a file, moving it between directories if required.
-
 Any other hard links to the file (as created using
 .BR link (2))
 are unaffected.
+Open file descriptors for
+.I oldpath
+are also unaffected.
 
 If
 .I newpath
@@ -51,6 +54,14 @@ no point at which another process attempting to access
 .I newpath
 will find it missing.
 
+If
+.I oldpath
+and
+.I newpath
+are existing hard links referring to the same file, then
+.BR rename ()
+does nothing, and returns a success status.
+
 If
 .I newpath
 exists but the operation fails for some reason
@@ -59,6 +70,12 @@ guarantees to leave an instance of
 .I newpath
 in place.
 
+.I oldpath
+can specify a directory.
+In this case, 
+.I newpath
+must either not exist, or it must specify an empty directory.
+
 However, when overwriting there will probably be a window in which
 both
 .I oldpath