1a00a7fdf5
Correct the off_t/size_t max_to_write overflow check.
Andrew Wood2026-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 Wood2026-05-15 23:23:24 +01:00
82de6be6fd
Adjust removal note now Georgian has been restored.
Andrew Wood2026-05-14 21:54:07 +01:00
958cacf4bb
Restore the empty Georgian language file as requested.
Andrew Wood2026-05-14 21:53:11 +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 Wood2026-05-13 22:19:03 +01:00
d65dbd2f37
Make pv_format() static, as it is only used in one place (cppcheck recommendation).
Andrew Wood2026-05-12 23:06:09 +01:00
65741d9b2e
Remove needless "continue" in the empty "for" loop (cppcheck recommendation).
Andrew Wood2026-05-11 20:59:42 +01:00
4fbcfebc6c
Remove needless comparisons that would always be true here (cppcheck recommendation).
Andrew Wood2026-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 Wood2026-05-11 20:50:43 +01:00
229aadf194
Make the struct dirent a const (cppcheck recommendation).
Andrew Wood2026-05-11 20:43:45 +01:00
61b412b0f1
Mark pointers to constant buffers as const (cppcheck recommendation).
Andrew Wood2026-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 Wood2026-05-10 20:17:11 +01:00
f6b2196369
Reduce the scope of offset (cppcheck recommendation).
Andrew Wood2026-05-10 20:05:42 +01:00
d2c183d234
Remove redundant assigment (cppcheck recommendation).
Andrew Wood2026-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 Wood2026-05-10 19:25:07 +01:00
7ddbc72525
Make the struct tm a const (cppcheck recommendation).
Andrew Wood2026-05-10 19:19:30 +01:00
7c19f58e75
Mark pointers to constant buffers as const (cppcheck recommendation).
Andrew Wood2026-05-10 19:18:01 +01:00
723d96b54b
Mark argument as pointer to const, since only the pointer changes (cppcheck recommendation).
Andrew Wood2026-05-10 19:17:12 +01:00
6b5d217e22
Reduce the scope of end_idx (cppcheck recommendation).
Andrew Wood2026-05-10 19:15:54 +01:00
d9eb83e1f5
Make the struct tm a const (cppcheck recommendation).
Andrew Wood2026-05-10 19:15:17 +01:00
c69343856a
Correct the broken pull links from before the repository move (/pull/ should be /pulls/ on Codeberg).
Andrew Wood2026-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 Wood2026-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 Wood2026-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 Wood2026-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 Wood2026-05-07 23:00:33 +01:00
0e7a77b42a
Allow the rate limit to be specified as a fractional number (#193).
Andrew Wood2026-05-06 23:24:51 +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 Wood2026-05-03 19:37:27 +01:00
6b19d8e31c
Note the changes relating to the intermediate input pipe and the discard splice.
Andrew Wood2026-05-03 18:30:57 +01:00
f3ce23e7c7
Adjust the text relating to splice() in relation to the intermediate pipe development.
Andrew Wood2026-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 Wood2026-05-03 17:59:13 +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 Wood2026-05-03 14:53:45 +01:00
5fb7e49848
Start the intermediary pipe buffer size at 1MiB (#188).
Andrew Wood2026-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 Wood2026-05-03 01:12:33 +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 Wood2026-05-02 16:42:35 +01:00
d421024fb8
Run through "make indent" for consistency, update message line numbers.
Andrew Wood2026-05-01 19:47:10 +01:00
096b655bb8
Remove the note about getting stuck when writing to an exited reader, as it was fixed in #189.
Andrew Wood2026-05-01 19:09:20 +01:00
7a276040ad
Note the fix for the endless wait on EOF issue (#189).
Andrew Wood2026-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 Wood2026-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 Wood2026-05-01 19:42:43 +02:00
a3f0caeab4
Record the received number before setting the exit trigger, so it will definitely be available for reporting (#187).
Andrew Wood2026-04-28 22:55:16 +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 Wood2026-04-27 21:27:20 +01:00
c763f1fcaa
Write an error message if interrupted by a signal such as SIGINT (#187).
Andrew Wood2026-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 Wood2026-04-26 20:01:22 +01:00
57f0b91d16
Adjust the watchfd changes for Apple builds.
Andrew Wood2026-04-25 23:05:17 +01:00
2a31b73a32
Replace the fixed-sized buffers file_fdinfo and file_fdsymlink with dynamically allocated equivalents.
Andrew Wood2026-04-25 22:04:38 +01:00
ee96f3f43b
Specify which watched PID had the problem.
Andrew Wood2026-04-25 21:04:41 +01:00
2b1d359281
Use pv_asprintf() to allocate fd_dir instead of having it statically sized.
Andrew Wood2026-04-25 21:03:09 +01:00
18b1926d61
Replace the fixed-size "cwd" buffer with a dynamically allocated one.
Andrew Wood2026-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 Wood2026-04-23 21:42:10 +01:00
a220e993af
Adjust the wording as pv does not "know" things.
Andrew Wood2026-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 Wood2026-04-21 22:13:44 +01:00
c0e530eefd
Use awk instead of the non-portable "~" sed command.
Andrew Wood2026-04-20 22:55:24 +01:00
1d28da18ce
Add a basic test for monitoring, each of the "in" and "out" sides.
Andrew Wood2026-04-19 23:12:10 +01:00
496b1e431e
Return a boolean from pv__transfer_read/write, where false indicates a transient error.
Andrew Wood2026-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 Wood2026-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 Wood2026-04-19 17:57:32 +01:00
c19d16b3c8
Loosen the limits on this test slightly.
Andrew Wood2026-04-19 17:47:52 +01:00
0440ba26da
Adjust the ETA clamp note to mention 64-bit.
Andrew Wood2026-04-19 16:58:55 +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 Wood2026-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 Wood2026-04-19 16:24:26 +01:00