Commit Graph

  • 1a00a7fdf5 Correct the off_t/size_t max_to_write overflow check. Andrew Wood 2026-05-15 23:42:49 +01:00
  • d546e90a94 Break pv__transfer_read() into smaller functions to separate out the different parts, and improve the splice() handling when rate limiting and when EOF / Control-D is typed into stdin. Andrew Wood 2026-05-15 23:23:24 +01:00
  • 82de6be6fd Adjust removal note now Georgian has been restored. Andrew Wood 2026-05-14 21:54:07 +01:00
  • 958cacf4bb Restore the empty Georgian language file as requested. Andrew Wood 2026-05-14 21:53:11 +01:00
  • 8198058bb2 Message line number updates. Andrew Wood 2026-05-14 21:51:45 +01:00
  • 60203aabf5 Add retries on signal interrupt to the splicing into and out of the intermediate input pipe, and add a TODO marker highlighting a problem with the way splice() is currently handled. Andrew Wood 2026-05-13 22:19:03 +01:00
  • d65dbd2f37 Make pv_format() static, as it is only used in one place (cppcheck recommendation). Andrew Wood 2026-05-12 23:06:09 +01:00
  • 65741d9b2e Remove needless "continue" in the empty "for" loop (cppcheck recommendation). Andrew Wood 2026-05-11 20:59:42 +01:00
  • 4fbcfebc6c Remove needless comparisons that would always be true here (cppcheck recommendation). Andrew Wood 2026-05-11 20:56:10 +01:00
  • 270bcb066e Make pv_watchfd_info() and pv_reset_watchfd() static, as they are only used in one place (cppcheck recommendation). Andrew Wood 2026-05-11 20:50:43 +01:00
  • 229aadf194 Make the struct dirent a const (cppcheck recommendation). Andrew Wood 2026-05-11 20:43:45 +01:00
  • 6b0f8477d0 Message line number updates. Andrew Wood 2026-05-10 20:52:15 +01:00
  • 61b412b0f1 Mark pointers to constant buffers as const (cppcheck recommendation). Andrew Wood 2026-05-10 20:38:49 +01:00
  • 6772d7e5a1 Read the EOF values in the debug statements by dereferencing the eof_in and eof_out pointers, not by using the pointers as a truth value. Andrew Wood 2026-05-10 20:17:11 +01:00
  • f6b2196369 Reduce the scope of offset (cppcheck recommendation). Andrew Wood 2026-05-10 20:05:42 +01:00
  • d2c183d234 Remove redundant assigment (cppcheck recommendation). Andrew Wood 2026-05-10 19:55:02 +01:00
  • e09976042d Reduce the scope of the first keyword_index (cppcheck recommendation), and in the formatter, guard against a size_t underflow by checking the write position each time it's used (implied by cppcheck). Andrew Wood 2026-05-10 19:25:07 +01:00
  • 7ddbc72525 Make the struct tm a const (cppcheck recommendation). Andrew Wood 2026-05-10 19:19:30 +01:00
  • 7c19f58e75 Mark pointers to constant buffers as const (cppcheck recommendation). Andrew Wood 2026-05-10 19:18:01 +01:00
  • 723d96b54b Mark argument as pointer to const, since only the pointer changes (cppcheck recommendation). Andrew Wood 2026-05-10 19:17:12 +01:00
  • 6b5d217e22 Reduce the scope of end_idx (cppcheck recommendation). Andrew Wood 2026-05-10 19:15:54 +01:00
  • d9eb83e1f5 Make the struct tm a const (cppcheck recommendation). Andrew Wood 2026-05-10 19:15:17 +01:00
  • 411f9529a2 Message line number updates. Andrew Wood 2026-05-09 20:25:04 +01:00
  • adf2767763 Additional commentary on total_written and rate limiting. Andrew Wood 2026-05-09 20:24:49 +01:00
  • 4fc5d10671 Remove spurious extra word. Andrew Wood 2026-05-09 20:08:25 +01:00
  • 19d1835d37 Message line number updates. Andrew Wood 2026-05-09 20:04:09 +01:00
  • 6f9e73f058 Add more detailed comments about the rate limiter. Andrew Wood 2026-05-09 20:04:02 +01:00
  • 5897576ca1 Message line number updates. Andrew Wood 2026-05-09 17:23:50 +01:00
  • 9b28da72eb Acknowledge the contribution. Andrew Wood 2026-05-09 17:22:32 +01:00
  • d49234eefe Update the notes about numbers passed to --rate-limit. Andrew Wood 2026-05-09 17:18:42 +01:00
  • 4bfe83a445 Note the --rate-limit change allowing decimal values. Andrew Wood 2026-05-09 17:16:22 +01:00
  • 228ff740bf Merge branch 'fractional_rate_limit' (#193). Andrew Wood 2026-05-09 16:15:14 +01:00
  • c69343856a Correct the broken pull links from before the repository move (/pull/ should be /pulls/ on Codeberg). Andrew Wood 2026-05-09 16:12:38 +01:00
  • d381a1c714 Correct the rate limit burst cap so it won't prevent output when the rate is below 0.2, and handle the case where more than one rate limit interval has passed since the last calculation (#193). Andrew Wood 2026-05-09 00:37:29 +01:00
  • 0a98062586 Define RATE_BURST_WINDOW as a floating point value since it's used in floating point calculations (#193). Andrew Wood 2026-05-09 00:35:19 +01:00
  • e7087b101d Allow "-L 0" to be propagated with "-R" so that a remote process can have its rate limiting turned off as well as on; and update the manual to note this (#193). Andrew Wood 2026-05-08 21:07:29 +01:00
  • eae06cf3c0 Correct the remote setting of the rate limit so that -R without -L does not turn off the current rate limiting of the remote process (#193). Andrew Wood 2026-05-07 23:00:33 +01:00
  • 0e7a77b42a Allow the rate limit to be specified as a fractional number (#193). Andrew Wood 2026-05-06 23:24:51 +01:00
  • a78a432f50 Message line number updates. Andrew Wood 2026-05-05 21:05:27 +01:00
  • 4867b641a7 Adjust the item ordering. Andrew Wood 2026-05-05 21:03:55 +01:00
  • 355d030ce0 Datestamp update. Andrew Wood 2026-05-05 20:55:17 +01:00
  • 547efed258 Set the exit status to 8 when /dev/null is not usable and --discard is active (#192). Andrew Wood 2026-05-04 16:30:34 +01:00
  • a4b90879a0 Add the messages for the pipe buffer size option and /dev/null detection. Andrew Wood 2026-05-03 20:57:00 +01:00
  • 3b1bad2334 Acknowledgements update. Andrew Wood 2026-05-03 20:56:33 +01:00
  • cfe7b4e97a Whitespace correction in comment. Andrew Wood 2026-05-03 19:42:33 +01:00
  • 10895792d2 When opening /dev/null internally, check that it really is a null device, and refuse to use it if not (#192). Andrew Wood 2026-05-03 19:37:27 +01:00
  • 6b19d8e31c Note the changes relating to the intermediate input pipe and the discard splice. Andrew Wood 2026-05-03 18:30:57 +01:00
  • f3ce23e7c7 Adjust the text relating to splice() in relation to the intermediate pipe development. Andrew Wood 2026-05-03 18:26:55 +01:00
  • 663a54bda0 Merge the changes for #188 and #191 which add an intermediate pipe on the input side to allow splice() to be used for all transfers. Andrew Wood 2026-05-03 17:59:13 +01:00
  • ae60fc0688 Move output_fd into HAVE_SPLICE. Andrew Wood 2026-05-03 17:06:47 +01:00
  • 11d727a88d In discard mode, if splice() is available, open a file descriptor to /dev/null and splice the input to that, to improve performance (#191). Andrew Wood 2026-05-03 14:53:45 +01:00
  • b75ecd79d5 Add comments explaining the steps (#188). Andrew Wood 2026-05-03 13:42:27 +01:00
  • 5fb7e49848 Start the intermediary pipe buffer size at 1MiB (#188). Andrew Wood 2026-05-03 13:41:52 +01:00
  • 21c8237a73 When splice() is available but neither the input nor the output are pipes, splice the input through an intermediary pipe (#188). Andrew Wood 2026-05-03 01:12:33 +01:00
  • b300046eb1 Acknowledgements update. Andrew Wood 2026-05-02 17:12:21 +01:00
  • 17cbab3045 Add an option "-J" / "--pipe-buffer-size" to set the size of the output pipe buffer when the output is a pipe, and when that option is not specified, automatically increase the output pipe buffer size to match that of the input, when the first input is also a pipe (#188). Andrew Wood 2026-05-02 16:42:35 +01:00
  • d421024fb8 Run through "make indent" for consistency, update message line numbers. Andrew Wood 2026-05-01 19:47:10 +01:00
  • 7a6ce0f0b6 Message line number updates. Andrew Wood 2026-05-01 19:10:30 +01:00
  • b1bf99c09b Datestamp update. Andrew Wood 2026-05-01 19:10:04 +01:00
  • 096b655bb8 Remove the note about getting stuck when writing to an exited reader, as it was fixed in #189. Andrew Wood 2026-05-01 19:09:20 +01:00
  • 7a276040ad Note the fix for the endless wait on EOF issue (#189). Andrew Wood 2026-05-01 19:07:44 +01:00
  • 89d2a7840f Acknowledge the contributor of the fix for endlessly waiting for an exited receiver to empty the pipe buffer (#189, #190). Andrew Wood 2026-05-01 19:07:07 +01:00
  • fb2b325e94 Merge pull request 'fix: avoid EOF hang on unread pipe output (#189)' (#190) from whoschek/pv:wip/eof_hang into main Andrew Wood 2026-05-01 19:42:43 +02:00
  • e7d188ac65 fix: avoid EOF hang on unread pipe output (#189) Wolfgang Hoschek 2026-04-30 03:34:37 -04:00
  • 79a6420fea Replace the fixed-sized buffer file_fdpath with a dynamically allocated equivalent. Andrew Wood 2026-04-29 21:43:46 +01:00
  • c54c3258a6 Acknowledge the reporter (#187). Andrew Wood 2026-04-29 20:10:02 +01:00
  • 0c28d017de Note the signal interrupt message feature (#187). Andrew Wood 2026-04-29 19:54:27 +01:00
  • 0a69501594 Add the new signal interrupt message (#187). Andrew Wood 2026-04-29 19:53:43 +01:00
  • a3f0caeab4 Record the received number before setting the exit trigger, so it will definitely be available for reporting (#187). Andrew Wood 2026-04-28 22:55:16 +01:00
  • 478039f539 Report which signal triggered the exit (#187). Andrew Wood 2026-04-28 22:53:23 +01:00
  • 2a25221eaf Suppress the error message about a signal interrupt in cursor mode in all but the first instance in a pipeline (#187). Andrew Wood 2026-04-27 21:27:20 +01:00
  • c763f1fcaa Write an error message if interrupted by a signal such as SIGINT (#187). Andrew Wood 2026-04-26 21:45:36 +01:00
  • 8b4fa8ade7 Clear the terminal flag ECHOCTL before starting, and set it again at the end, similar to how TOSTOP is dealt with (#187). Andrew Wood 2026-04-26 20:01:22 +01:00
  • 57f0b91d16 Adjust the watchfd changes for Apple builds. Andrew Wood 2026-04-25 23:05:17 +01:00
  • a66a1cc10c Message line number updates. Andrew Wood 2026-04-25 22:06:18 +01:00
  • 2a31b73a32 Replace the fixed-sized buffers file_fdinfo and file_fdsymlink with dynamically allocated equivalents. Andrew Wood 2026-04-25 22:04:38 +01:00
  • ee96f3f43b Specify which watched PID had the problem. Andrew Wood 2026-04-25 21:04:41 +01:00
  • 2b1d359281 Use pv_asprintf() to allocate fd_dir instead of having it statically sized. Andrew Wood 2026-04-25 21:03:09 +01:00
  • 4854d71aa9 Adjustment from "make indent". Andrew Wood 2026-04-25 21:01:56 +01:00
  • 18b1926d61 Replace the fixed-size "cwd" buffer with a dynamically allocated one. Andrew Wood 2026-04-24 23:00:45 +01:00
  • 43a54bd541 Rename the pvwatchfd "file_fd" item to "file_fdsymlink" to to better distinguish it from the other structure members. Andrew Wood 2026-04-23 21:42:10 +01:00
  • bf371e9a8c Tidy up comments. Andrew Wood 2026-04-22 22:21:36 +01:00
  • 239a20d13f Tidy up comments. Andrew Wood 2026-04-21 23:45:56 +01:00
  • a220e993af Adjust the wording as pv does not "know" things. Andrew Wood 2026-04-21 22:18:13 +01:00
  • a955038360 Document the behaviour exhibited when pv writes to a pipe and the reader exits with unread data in the pipe buffer. Andrew Wood 2026-04-21 22:13:44 +01:00
  • c0e530eefd Use awk instead of the non-portable "~" sed command. Andrew Wood 2026-04-20 22:55:24 +01:00
  • 1d28da18ce Add a basic test for monitoring, each of the "in" and "out" sides. Andrew Wood 2026-04-19 23:12:10 +01:00
  • 571c3bee06 Datestamp update. Andrew Wood 2026-04-19 21:51:24 +01:00
  • 618f1c1578 Message line number updates. Andrew Wood 2026-04-19 21:49:12 +01:00
  • 496b1e431e Return a boolean from pv__transfer_read/write, where false indicates a transient error. Andrew Wood 2026-04-19 21:47:46 +01:00
  • ef9240a7a5 Add another _ to the internal read/write_repeated functions so they are easier to distinguish from pv__transfer_read/write when searching. Andrew Wood 2026-04-19 21:15:33 +01:00
  • 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. Andrew Wood 2026-04-19 17:57:32 +01:00
  • c19d16b3c8 Loosen the limits on this test slightly. Andrew Wood 2026-04-19 17:47:52 +01:00
  • 0440ba26da Adjust the ETA clamp note to mention 64-bit. Andrew Wood 2026-04-19 16:58:55 +01:00
  • 070bcb5acc Message line number updates. Andrew Wood 2026-04-19 16:58:14 +01:00
  • f3353cb4bd Adjust the ETA max to 68 years on systems where a long integer is 32 bits wide, as that is all that will fit. Andrew Wood 2026-04-19 16:58:05 +01:00
  • 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. Andrew Wood 2026-04-19 16:24:26 +01:00
  • a59c91f03d Note the time clamping changes. Andrew Wood 2026-04-19 13:06:59 +01:00
  • f724ebe158 Message line number updates. Andrew Wood 2026-04-19 13:04:30 +01:00
  • 3bc102c334 Increase the ETA max cutoff to just under 1,000,000 days, not 100,000. Andrew Wood 2026-04-19 13:04:05 +01:00