From 9a15fcf4913ecca267fe2bdd8f24a3f67594a3e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 23 Sep 2001 05:03:42 +0000 Subject: [PATCH] (write_archive_buffer, close_archive): If an archive is a socket, treat it like a FIFO. --- src/buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.45.2