summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-10-21 07:16:19 +0000
committerJim Meyering <jim@meyering.net>2006-10-21 07:16:19 +0000
commit46775398f2575505d355a5fea93f87bb45f07937 (patch)
tree9076beb629871d5f8b2b2b15103e09947dbd9b7c
parenta75684d6ea835d6c5c92e494dd29cf3c65e6cb9c (diff)
downloadcoreutils-46775398f2575505d355a5fea93f87bb45f07937.tar.xz
* src/copy.c (copy_internal): Add a comment saying why we prefer
mknod over mkfifo.
-rw-r--r--ChangeLog3
-rw-r--r--src/copy.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fee765444..260955c39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2006-10-21 Jim Meyering <jim@meyering.net>
+ * src/copy.c (copy_internal): Add a comment saying why we prefer
+ mknod over mkfifo.
+
Enable an fts optimization (call lstat only for directories,
on some file system types) also with the --preserve-root option
of chown or chgrp.
diff --git a/src/copy.c b/src/copy.c
index 3cc809459..5b66b281d 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1634,6 +1634,9 @@ copy_internal (char const *src_name, char const *dst_name,
}
else if (S_ISFIFO (src_mode))
{
+ /* Use mknod, rather than mkfifo, because the former preserves
+ the special mode bits of a fifo on Solaris 10, while mkfifo
+ does not. */
if (mknod (dst_name, src_mode, 0) != 0)
{
error (0, errno, _("cannot create fifo %s"), quote (dst_name));