mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
* fix: handle EINTR (signal interruptions) in cat, od, and comm Add proper retry loops for ErrorKind::Interrupted in I/O operations to handle signals like SIGUSR1 that can interrupt read/write calls. This pattern is proven in production - identical to PR #6025 (merged March 2024) which fixed dd's EINTR handling for GNU test dd/stats.sh. The same pattern is already used in 9+ utilities (head, tail, tee, wc, sort, sum, tr, shuf, dd) without issues. Changes: - cat: Fix write_fast() and write_lines() to retry on EINTR - od: Fix PartialReader::read() in all three read paths - comm: Fix are_files_identical() for both file readers - tests: Add InterruptingReader/Writer test utilities Historical context: - Pattern validated by cre4ture's PR #6025 (dd EINTR fix) - Matches existing implementations in dd/dd.rs:450,881 - POSIX best practice for signal-interrupted I/O Fixes #1275 * fix: handle EINTR (signal interruptions) in cat, od, and comm Add proper retry loops for ErrorKind::Interrupted in I/O operations to handle signals like SIGUSR1 that can interrupt read/write calls. Pattern matches PR #6025 (dd EINTR fix) and is already used in 9+ utilities. Changes: - cat: Fix write_fast() and write_lines() to retry on EINTR - od: Fix PartialReader::read() in all three read paths - comm: Fix are_files_identical() for both file readers - tests: Add visible EINTR integration tests for CI Addresses sylvestre's review feedback on code documentation and CI test visibility. * style: apply cargo fmt formatting to EINTR changes * test: fix EINTR integration test failures - Fix comm test: use stdout_contains instead of stdout_only for tabbed output - Fix od test: create new command instance to avoid 'already run this UCommand' error - Remove unused imports and dead code to eliminate compiler warnings - Both tests now pass without warnings or errors * style: fix formatting and remove duplicate comment in od test * ci: add EINTR and related technical terms to appropriate cspell dictionaries - Add EINTR, eintr, nextest to jargon.wordlist.txt (technical/systems programming terms) - Add SIGUSR, SIGINT, etc. to shell.wordlist.txt (POSIX signals) - Add uutils, coreutils, ucmd, etc. to workspace.wordlist.txt (project-specific terms) - Fixes CI cspell warnings for legitimate technical terminology - Proper categorization follows existing dictionary structure |
||
|---|---|---|
| .. | ||
| benches/factor | ||
| by-util | ||
| fixtures | ||
| uudoc | ||
| uutests | ||
| test_localization_and_colors.rs | ||
| test_util_name.rs | ||
| tests.rs | ||