From: Paul Eggert Date: Sun, 23 Sep 2001 05:03:42 +0000 (+0000) Subject: (write_archive_buffer, close_archive): If an archive is a socket, X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=9a15fcf4913ecca267fe2bdd8f24a3f67594a3e3;p=chaz%2Ftar (write_archive_buffer, close_archive): If an archive is a socket, treat it like a FIFO. --- diff --git a/src/buffer.c b/src/buffer.c index d29cccc..949505c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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