From: Jim Meyering Date: Sat, 21 Oct 2006 07:16:19 +0000 (+0000) Subject: * src/copy.c (copy_internal): Add a comment saying why we prefer X-Git-Tag: COREUTILS-6_4~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46775398f2575505d355a5fea93f87bb45f07937;p=thirdparty%2Fcoreutils.git * src/copy.c (copy_internal): Add a comment saying why we prefer mknod over mkfifo. --- diff --git a/ChangeLog b/ChangeLog index fee7654447..260955c395 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-10-21 Jim Meyering + * 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 3cc8094593..5b66b281d4 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));