Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xargs: eof ignored #594

Merged
merged 1 commit into from
May 1, 2024
Merged

xargs: eof ignored #594

merged 1 commit into from
May 1, 2024

Conversation

mknos
Copy link
Contributor

@mknos mknos commented May 1, 2024

  • Test cases: "perl xargs" and "perl xargs ls"
  • Text entered manually:
    1
    2
    3
    ^D
  • xargs correctly runs a program (echo or ls) on 1, 2 and 3, then incorrectly waits to read more data from stdin
  • Checking eof() after each read indicates whether xargs should terminate (no more args will follow so the program should not loop)
  • Tweak usage string to clarify that "prog" is optional (echo is the default)

* Test cases: "perl xargs" and "perl xargs ls"
* Text entered manually:
1
2
3
^D
* xargs correctly runs a program (echo or ls) on 1, 2 and 3, then incorrectly waits to read more data from stdin (end of file was not seen)
* Checking eof() after each read indicates whether xargs should terminate (no more args will follow so the program should not loop)
* Tweak usage string to clarify that "prog" is optional (echo is the default)
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: xargs The xargs program labels May 1, 2024
@briandfoy briandfoy self-assigned this May 1, 2024
@briandfoy briandfoy merged commit f3af515 into briandfoy:master May 1, 2024
2 checks passed
@briandfoy
Copy link
Owner

changes: check eof() to know when to stop

@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: xargs The xargs program Status: accepted The fix is accepted Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants