76 Commits
Author SHA1 Message Date
Andrew Wood 6130d65249 Use copy_file_range() for transfers if it is available (#196). 2026-05-31 22:18:18 +01:00
Wolfgang Hoschek e7d188ac65 fix: avoid EOF hang on unread pipe output (#189)
At EOF, pv waits for bytes already written to an output pipe to be consumed before finishing. If the downstream reader exits without reading those bytes, the pipe can keep reporting unread data forever. Since pv has no more input, there is no later write that would fail with EPIPE and break the wait.

Detect this EOF drain-wait case with a non-blocking poll() on the output pipe. When the pipe reports that its readers are gone, mark the pipe closed and stop waiting for bytes that can no longer be consumed. While a reader is still present, keep the existing behaviour and continue waiting for the pipe buffer to drain.

Add regression coverage for both ways pv can reach this state: direct input that leaves unread output bytes behind, and a pipeline where the original producer fails but an intermediate filter such as gzip still emits a valid empty stream. The latter matters because pv can still have pending output at EOF even when the command at the start of the pipeline failed immediately.

Signed-off-by: Wolfgang Hoschek <wolfgang.hoschek@mac.com>
2026-04-30 04:47:09 -04:00
Andrew Wood 478039f539 Report which signal triggered the exit (#187). 2026-04-28 22:53:23 +01:00
Andrew Wood 18b1926d61 Replace the fixed-size "cwd" buffer with a dynamically allocated one. 2026-04-24 23:00:45 +01:00
Andrew Wood b2f44b6724 Clamp the calculated ETA to within the size of a long integer to avoid over/underflows, and round off the floating point value rather than just truncating the decimal portion. 2026-04-19 17:57:32 +01:00
Andrew Wood 9f63212a7c Add pv_asprintf() and change the way the terminal lock file is stored, so it is in a dynamically allocated buffer rather than using one of a fixed size. 2026-04-19 16:24:26 +01:00
Andrew Wood 7c0573c847 Version bump for feature addition. 2026-04-04 13:37:15 +01:00
Andrew Wood 59873f1d41 Commit to new version and release date. 2026-03-22 14:54:11 +00:00
Andrew Wood f65caacfca Version bump, and note the change to "--size @x" (#179). 2026-03-07 23:23:13 +00:00
Andrew Wood 0a27a85b4a Update the copyright years. 2026-03-07 23:20:20 +00:00
Andrew Wood d028d5165c Make the gettext macros behave on Debian 13. 2026-03-07 22:34:28 +00:00
Andrew Wood e17f64fce7 Allow "--size @dir" to read the size of all files under "dir" (#179). 2026-03-07 22:23:10 +00:00
Andrew Wood a890e8e0c8 Update version and release date. 2025-12-15 20:09:56 +00:00
Andrew Wood ff412009da Version bump for #174. 2025-11-21 23:27:47 +00:00
Andrew Wood 7ba474509c Version bump. 2025-11-12 14:32:39 +00:00
Andrew Wood 94b8b8625f Bump minor version, since there is a new feature. 2025-10-31 19:47:07 +00:00
Andrew Wood a5fd8d662e Version bump, and mention the fix to timer behaviour when "--watchfd" is paused and resumed (#169). 2025-10-30 21:18:26 +00:00
Andrew Wood 07e6255e7e Version bump, and mention the new "--query" option (#101). 2025-10-26 13:14:28 +00:00
Andrew Wood b434c858a2 Version and datestamp bump. 2025-10-17 23:21:52 +01:00
Andrew Wood 8d939c9b99 Provisional version bump. 2025-10-11 16:00:13 +01:00
Andrew Wood 44d7f94c31 Version bump. 2025-07-25 23:57:51 +01:00
Andrew Wood cd7c8f7849 Version bump. 2025-07-25 22:32:05 +01:00
Andrew Wood e6638faffc New shorter home page URL. 2025-05-31 15:21:56 +01:00
Andrew Wood 5423ae40d6 Removed www. prefix from ivarch.com URL. 2025-02-19 23:18:56 +00:00
Andrew Wood 2de68acfea Remove the bug reporting email address. 2025-02-19 21:55:28 +00:00
Andrew Wood 5483ddf024 Version bump. 2025-01-28 21:22:12 +00:00
Andrew Wood 8ba24e39e0 Version bump. 2025-01-11 21:40:02 +00:00
Andrew Wood 42e47e8291 Turn off IPC support when sys/shm.h is missing, to fix compilation on Termux. 2025-01-10 23:23:07 +00:00
Andrew Wood 7d6c7d0735 Copyright note update for 2025. 2025-01-03 16:11:08 +00:00
Andrew Wood 16a16460fc Version and date update. 2024-12-22 12:18:42 +00:00
Andrew Wood cec252f98f Version adjustment and news reformatting for release. 2024-12-19 20:50:06 +00:00
Andrew Wood ff0355ca9c Make the moving indicator more granular on wide displays by calculating its position with floating point rather than integer values. 2024-12-18 21:59:17 +00:00
Andrew Wood 823350a186 Preliminary version update. 2024-12-17 23:57:26 +00:00
Andrew Wood 0044ed18ae Use AS_HELP_STRING() consistently. 2024-12-17 21:42:56 +00:00
Andrew Wood a9bbb55220 Preliminary version update. 2024-12-17 21:37:11 +00:00
Andrew Wood 3c09b31f92 Add colour code support with a %{sgr:...} format sequence. 2024-12-15 23:25:20 +00:00
Andrew Wood 7d18083dda Handle the fact that the GNU Hurd sets the signal sender PID to -1, not either 0 or the signal sender, in the siginfo structure. 2024-12-14 23:41:24 +00:00
Andrew Wood 51a5de71c1 Add a "can_display_utf8" flag based on the current locale, for future use. 2024-12-09 23:23:07 +00:00
Andrew Wood 2d28520ae4 Version bump. 2024-12-08 22:21:45 +00:00
Andrew Wood d51c57379a When cross-compiling, we cannot run a test program to check whether a siginfo_t provides the signal sender PID, so we fall back to assuming that it does, and also check that SA_SIGINFO is declared so compilation will not fail on systems without it (#120). 2024-12-03 21:04:58 +00:00
Andrew Wood 99bd1fc8d5 Version bump and associated updates. 2024-12-02 17:57:34 +00:00
Andrew Wood dccc7345ab New option "--extra-display" (#3, #4). 2024-12-01 19:39:59 +00:00
Andrew Wood c29d306d10 Additional configure.ac cleanups. 2024-12-01 15:42:59 +00:00
Andrew Wood 106a673ba8 Test at compile time whether siginfo_t is usable for --remote (#119). 2024-12-01 15:26:59 +00:00
Andrew Wood 0318db838e Version bump. 2024-10-15 22:11:38 +01:00
Andrew Wood 9bd5a518ea New option "--stats", to show a line of statistics about the transfer once it has ended (issue #49). 2024-10-04 15:12:22 +01:00
Andrew Wood f1f333dc7a Update version to 1.8.14. 2024-09-07 21:33:24 +01:00
Andrew Wood 2c468b0bb2 Version bump for new release. 2024-08-18 21:59:32 +01:00
Andrew Wood 60936080da Move the "--size @FILE" file size reading into its own function for clarity; standardise its error message format to "program: file: message: detail"; uniquely name variables; refuse to accept a directory as a file; and with this option, try reading the size of a block device from sysfs if we can, to avoid requiring read permissions on the device. 2024-08-06 23:17:15 +01:00
Andrew Wood ba72056bf2 Version bump. 2024-07-18 22:10:57 +01:00