Description:
When running tail -c +1 /dev/null, tail makes an unnecessary pipe2
syscall even though the file is empty and has no data to transfer.
The pipe creation is wasteful in this case.
Steps to reproduce:
strace -c -e pipe,pipe2 tail -c +1 /dev/null
Expected behavior: No pipe2 syscall for empty/exhausted files.
Actual behavior: 1 pipe2 call despite nothing to transfer.
Description:
When running
tail -c +1 /dev/null, tail makes an unnecessarypipe2syscall even though the file is empty and has no data to transfer.
The pipe creation is wasteful in this case.
Steps to reproduce:
Expected behavior: No
pipe2syscall for empty/exhausted files.Actual behavior: 1
pipe2call despite nothing to transfer.