]> Dogcows Code - chaz/tar/commitdiff
(write_archive_buffer, close_archive): If an archive is a socket,
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Sep 2001 05:03:42 +0000 (05:03 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Sep 2001 05:03:42 +0000 (05:03 +0000)
treat it like a FIFO.

src/buffer.c

index d29ccccef279350575905ec718a9326e32888264..949505c0b912ceb1b3d52fdf3907571c1994adb9 100644 (file)
@@ -301,7 +301,9 @@ write_archive_buffer (void)
     {
       written += status;
       if (written == record_size
-         || _isrmt (archive) || ! S_ISFIFO (archive_stat.st_mode))
+         || _isrmt (archive)
+         || ! (S_ISFIFO (archive_stat.st_mode)
+               || S_ISSOCK (archive_stat.st_mode)))
        break;
     }
 
@@ -1335,7 +1337,7 @@ close_archive (void)
 
   if (access_mode == ACCESS_READ
       && ! _isrmt (archive)
-      && S_ISFIFO (archive_stat.st_mode))
+      && (S_ISFIFO (archive_stat.st_mode) || S_ISSOCK (archive_stat.st_mode)))
     while (rmtread (archive, record_start->buffer, record_size) > 0)
       continue;
 #endif
This page took 0.02299 seconds and 4 git commands to generate.