You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xargs - stopping at the -E end-of-file string leaves nothing on seekable stdin for the next reader #1017
When xargs stops reading at the -E/--eof logical end-of-file string and its standard
input is a regular file, GNU xargs moves the file offset back to just after the input it
actually used. A later process that shares the same stdin, e.g. xargs -E X ...; cat in
one shell, sees the rest of the file. uutils reads stdin in 8 KiB chunks and never gives
back the unused part, so the shared offset is left at the end of the file (or 8 KiB in).
The next reader gets nothing.
With a pipe neither implementation can give the data back, and both behave the same. The
difference is only for seekable input.
This makes the GNU test sv-bug-20273 fail (sh -c 'xargs -E2; cat' < file).
Activity
sharmis-tp commentedon Nov 17, 2026
I'd like to work on this. The fix should seek stdin back to just past the last consumed line when
-Ematches on a seekable fd.