Skip to content

Fix regression: Allow FIFO / process substitution for --read-batch - #1060

Open
seks99x wants to merge 2 commits into
RsyncProject:masterfrom
seks99x:seks99x-batch-fix
Open

Fix regression: Allow FIFO / process substitution for --read-batch#1060
seks99x wants to merge 2 commits into
RsyncProject:masterfrom
seks99x:seks99x-batch-fix

Conversation

@seks99x

@seks99x seks99x commented Aug 15, 2026

Copy link
Copy Markdown
Member

V3.5.0 in batch.c commit 1604890 introduced a strict S_ISREG check for --read-batch argument paths. This inadvertently breaks bash process substitution (e.g., <(...)), which passes file descriptors as FIFOs (S_IFIFO).

Testing against the 3.4 branch succeeds, but fails on the current 3.5.0dev branch:

Bash

# rsync 3.4.x (Success)
./rsync --read-batch=<(cat reg) /tmp/rsync_test_dir/src/test
skipping non-regular file "test"

# rsync 3.5.0dev (Regression)
./rsync --read-batch=<(cat reg) /tmp/rsync_test_dir/src/test 
Batch file "/dev/fd/63" is not a regular file
rsync error: error in file IO (code 11) at batch.c(281) [Receiver=3.5.0dev-ge8c79d2d]

The Fix:
Modified the check in batch.c open_batch_file() to permit S_ISFIFO alongside S_ISREG.

Updated batch file checks to allow FIFO pipes while rejecting non-regular files.
@seks99x
seks99x force-pushed the seks99x-batch-fix branch 4 times, most recently from a1250e1 to 9ec4992 Compare August 15, 2026 17:00
@seks99x
seks99x force-pushed the seks99x-batch-fix branch from 9ec4992 to 0580585 Compare August 15, 2026 17:19
@seks99x

seks99x commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

the PR wont pass the CI without merging PR #1054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant